Class WebService

  • All Implemented Interfaces:
    swim.api.service.Service, swim.io.http.HttpInterface, swim.io.http.HttpService, swim.io.IpInterface

    public class WebService
    extends Object
    implements swim.api.service.Service, swim.io.http.HttpService, swim.io.http.HttpInterface
    • Constructor Detail

      • WebService

        public WebService​(swim.kernel.KernelContext kernel,
                          swim.api.service.ServiceContext serviceContext,
                          WebServiceDef serviceDef,
                          swim.web.WebRoute router)
    • Method Detail

      • kernel

        public final swim.kernel.KernelContext kernel()
      • serviceContext

        public final swim.api.service.ServiceContext serviceContext()
        Specified by:
        serviceContext in interface swim.api.service.Service
      • httpServiceContext

        public final swim.io.http.HttpServiceContext httpServiceContext()
        Specified by:
        httpServiceContext in interface swim.io.http.HttpService
      • setHttpServiceContext

        public void setHttpServiceContext​(swim.io.http.HttpServiceContext httpServiceContext)
        Specified by:
        setHttpServiceContext in interface swim.io.http.HttpService
      • router

        public final swim.web.WebRoute router()
      • router

        public WebService router​(swim.web.WebRoute router)
      • ipSettings

        public final swim.io.IpSettings ipSettings()
        Specified by:
        ipSettings in interface swim.io.IpInterface
      • httpSettings

        public final swim.io.http.HttpSettings httpSettings()
        Specified by:
        httpSettings in interface swim.io.http.HttpInterface
      • warpSettings

        public final swim.io.warp.WarpSettings warpSettings()
      • bindTcp

        public swim.io.IpServiceRef bindTcp​(InetSocketAddress localAddress,
                                            swim.io.IpService service,
                                            swim.io.IpSettings ipSettings)
        Specified by:
        bindTcp in interface swim.io.IpInterface
      • bindTls

        public swim.io.IpServiceRef bindTls​(InetSocketAddress localAddress,
                                            swim.io.IpService service,
                                            swim.io.IpSettings ipSettings)
        Specified by:
        bindTls in interface swim.io.IpInterface
      • connectTcp

        public swim.io.IpSocketRef connectTcp​(InetSocketAddress remoteAddress,
                                              swim.io.IpSocket socket,
                                              swim.io.IpSettings ipSettings)
        Specified by:
        connectTcp in interface swim.io.IpInterface
      • connectTls

        public swim.io.IpSocketRef connectTls​(InetSocketAddress remoteAddress,
                                              swim.io.IpSocket socket,
                                              swim.io.IpSettings ipSettings)
        Specified by:
        connectTls in interface swim.io.IpInterface
      • createServer

        public swim.io.http.HttpServer createServer()
        Specified by:
        createServer in interface swim.io.http.HttpService
      • willStart

        public void willStart()
        Specified by:
        willStart in interface swim.api.service.Service
      • didStart

        public void didStart()
        Specified by:
        didStart in interface swim.api.service.Service
      • didBind

        public void didBind()
        Specified by:
        didBind in interface swim.io.http.HttpService
      • didAccept

        public void didAccept​(swim.io.http.HttpServer server)
        Specified by:
        didAccept in interface swim.io.http.HttpService
      • didUnbind

        public void didUnbind()
        Specified by:
        didUnbind in interface swim.io.http.HttpService
      • willStop

        public void willStop()
        Specified by:
        willStop in interface swim.api.service.Service
      • didStop

        public void didStop()
        Specified by:
        didStop in interface swim.api.service.Service
      • willClose

        public void willClose()
        Specified by:
        willClose in interface swim.api.service.Service
      • didClose

        public void didClose()
        Specified by:
        didClose in interface swim.api.service.Service
      • didFail

        public void didFail​(Throwable error)
        Specified by:
        didFail in interface swim.io.http.HttpService
        Specified by:
        didFail in interface swim.api.service.Service