- java.lang.Object
-
- swim.service.web.WebService
-
- All Implemented Interfaces:
Service
,HttpInterface
,HttpService
,IpInterface
public class WebService extends Object implements Service, HttpService, HttpInterface
-
-
Constructor Summary
Constructors Constructor Description WebService(KernelContext kernel, ServiceContext serviceContext, WebServiceDef serviceDef, WebRoute router)
-
Method Summary
Modifier and Type Method Description IpServiceRef
bindTcp(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
IpServiceRef
bindTls(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
IpSocketRef
connectTcp(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
IpSocketRef
connectTls(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
HttpServer
createServer()
void
didAccept(HttpServer server)
void
didBind()
void
didClose()
void
didFail(Throwable error)
void
didStart()
void
didStop()
void
didUnbind()
HttpServiceContext
httpServiceContext()
HttpSettings
httpSettings()
IpSettings
ipSettings()
KernelContext
kernel()
WebRoute
router()
WebService
router(WebRoute router)
ServiceContext
serviceContext()
WebServiceDef
serviceDef()
void
setHttpServiceContext(HttpServiceContext httpServiceContext)
WarpSettings
warpSettings()
void
willClose()
void
willStart()
void
willStop()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface swim.io.http.HttpInterface
bindHttp, bindHttp, bindHttp, bindHttp, bindHttps, bindHttps, bindHttps, bindHttps, connectHttp, connectHttp, connectHttp, connectHttp, connectHttps, connectHttps, connectHttps, connectHttps
-
Methods inherited from interface swim.io.IpInterface
bindTcp, bindTcp, bindTcp, bindTls, bindTls, bindTls, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTcp, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls, connectTls
-
-
-
-
Constructor Detail
-
WebService
public WebService(KernelContext kernel, ServiceContext serviceContext, WebServiceDef serviceDef, WebRoute router)
-
-
Method Detail
-
kernel
public final KernelContext kernel()
-
serviceContext
public final ServiceContext serviceContext()
- Specified by:
serviceContext
in interfaceService
-
httpServiceContext
public final HttpServiceContext httpServiceContext()
- Specified by:
httpServiceContext
in interfaceHttpService
-
setHttpServiceContext
public void setHttpServiceContext(HttpServiceContext httpServiceContext)
- Specified by:
setHttpServiceContext
in interfaceHttpService
-
serviceDef
public final WebServiceDef serviceDef()
-
router
public final WebRoute router()
-
router
public WebService router(WebRoute router)
-
ipSettings
public final IpSettings ipSettings()
- Specified by:
ipSettings
in interfaceIpInterface
-
httpSettings
public final HttpSettings httpSettings()
- Specified by:
httpSettings
in interfaceHttpInterface
-
warpSettings
public final WarpSettings warpSettings()
-
bindTcp
public IpServiceRef bindTcp(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTcp
in interfaceIpInterface
-
bindTls
public IpServiceRef bindTls(InetSocketAddress localAddress, IpService service, IpSettings ipSettings)
- Specified by:
bindTls
in interfaceIpInterface
-
connectTcp
public IpSocketRef connectTcp(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTcp
in interfaceIpInterface
-
connectTls
public IpSocketRef connectTls(InetSocketAddress remoteAddress, IpSocket socket, IpSettings ipSettings)
- Specified by:
connectTls
in interfaceIpInterface
-
createServer
public HttpServer createServer()
- Specified by:
createServer
in interfaceHttpService
-
didBind
public void didBind()
- Specified by:
didBind
in interfaceHttpService
-
didAccept
public void didAccept(HttpServer server)
- Specified by:
didAccept
in interfaceHttpService
-
didUnbind
public void didUnbind()
- Specified by:
didUnbind
in interfaceHttpService
-
didFail
public void didFail(Throwable error)
- Specified by:
didFail
in interfaceHttpService
- Specified by:
didFail
in interfaceService
-
-