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
Netty
HttpServerImplementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures theHttpServer.createService(ServiceContext context) Creates the service.voidNotifies that theOfficeFloorhas been closed.voidNotifies that theOfficeFloorhas been opened.protected ProcessManagerservice(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 Details
-
NettyHttpServerImplementation
public NettyHttpServerImplementation()Default constructor required forServiceFactory.
-
-
Method Details
-
createService
Description copied from interface:ServiceFactoryCreates the service.- Specified by:
createServicein interfaceServiceFactory<HttpServerImplementation>- Parameters:
context-ServiceContext.- Returns:
- Service.
- Throws:
Throwable- If fails to create the service.
-
configureHttpServer
Description copied from interface:HttpServerImplementationConfigures theHttpServer.- Specified by:
configureHttpServerin interfaceHttpServerImplementation- Parameters:
context-HttpServerImplementationContext.
-
officeFloorOpened
Description copied from interface:OfficeFloorListenerNotifies that theOfficeFloorhas been opened.- Specified by:
officeFloorOpenedin interfaceOfficeFloorListener- Parameters:
event-OfficeFloorEvent.- Throws:
Exception- If fails to handle open listen logic.
-
officeFloorClosed
Description copied from interface:OfficeFloorListenerNotifies that theOfficeFloorhas been closed.- Specified by:
officeFloorClosedin interfaceOfficeFloorListener- Parameters:
event-OfficeFloorEvent.- Throws:
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 Exception Description copied from class:AbstractNettyHttpServerServices theHttpRequest.- Specified by:
servicein classAbstractNettyHttpServer- Parameters:
context-ChannelHandlerContext.request-HttpRequest.- Returns:
ProcessManager.- Throws:
Exception- If fails to service theHttpRequest.
-