Class NettyHttpServerImplementation
- java.lang.Object
-
- net.officefloor.server.http.netty.AbstractNettyHttpServer
-
- net.officefloor.server.http.netty.NettyHttpServerImplementation
-
- All Implemented Interfaces:
OfficeFloorListener
,ServiceFactory<HttpServerImplementation>
,HttpServerImplementation
,HttpServerImplementationFactory
public class NettyHttpServerImplementation extends AbstractNettyHttpServer implements HttpServerImplementation, HttpServerImplementationFactory, OfficeFloorListener
NettyHttpServerImplementation
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description NettyHttpServerImplementation()
Default constructor required forServiceFactory
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureHttpServer(HttpServerImplementationContext context)
Configures theHttpServer
.HttpServerImplementation
createService(ServiceContext context)
Creates the service.void
officeFloorClosed(OfficeFloorEvent event)
Notifies that theOfficeFloor
has been closed.void
officeFloorOpened(OfficeFloorEvent event)
Notifies that theOfficeFloor
has been opened.protected ProcessManager
service(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.HttpRequest request)
Services theHttpRequest
.-
Methods inherited from class net.officefloor.server.http.netty.AbstractNettyHttpServer
startHttpServer, stopHttpServer
-
-
-
-
Constructor Detail
-
NettyHttpServerImplementation
public NettyHttpServerImplementation()
Default constructor required forServiceFactory
.
-
-
Method Detail
-
createService
public HttpServerImplementation createService(ServiceContext context) throws java.lang.Throwable
Description copied from interface:ServiceFactory
Creates the service.- Specified by:
createService
in interfaceServiceFactory<HttpServerImplementation>
- Parameters:
context
-ServiceContext
.- Returns:
- Service.
- Throws:
java.lang.Throwable
- If fails to create the service.
-
configureHttpServer
public void configureHttpServer(HttpServerImplementationContext context)
Description copied from interface:HttpServerImplementation
Configures theHttpServer
.- Specified by:
configureHttpServer
in interfaceHttpServerImplementation
- Parameters:
context
-HttpServerImplementationContext
.
-
officeFloorOpened
public void officeFloorOpened(OfficeFloorEvent event) throws java.lang.Exception
Description copied from interface:OfficeFloorListener
Notifies that theOfficeFloor
has been opened.- Specified by:
officeFloorOpened
in interfaceOfficeFloorListener
- Parameters:
event
-OfficeFloorEvent
.- Throws:
java.lang.Exception
- If fails to handle open listen logic.
-
officeFloorClosed
public void officeFloorClosed(OfficeFloorEvent event) throws java.lang.Exception
Description copied from interface:OfficeFloorListener
Notifies that theOfficeFloor
has been closed.- Specified by:
officeFloorClosed
in interfaceOfficeFloorListener
- Parameters:
event
-OfficeFloorEvent
.- Throws:
java.lang.Exception
- If fails to handle close listen logic.
-
service
protected ProcessManager service(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.HttpRequest request) throws java.lang.Exception
Description copied from class:AbstractNettyHttpServer
Services theHttpRequest
.- Specified by:
service
in classAbstractNettyHttpServer
- Parameters:
context
-ChannelHandlerContext
.request
-HttpRequest
.- Returns:
ProcessManager
.- Throws:
java.lang.Exception
- If fails to service theHttpRequest
.
-
-