Class AbstractNettyHttpServer
java.lang.Object
net.officefloor.server.http.netty.AbstractNettyHttpServer
- Direct Known Subclasses:
NettyHttpServerImplementation
Abstract Netty HTTP server.
- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ProcessManagerservice(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.HttpRequest request) Services theHttpRequest.voidstartHttpServer(int httpPort, int httpsPort, SSLContext sslContext) Starts the HTTP Server.voidStops the HTTP server.
-
Constructor Details
-
AbstractNettyHttpServer
public AbstractNettyHttpServer(int maxRequestEntityLength) Instantiate.- Parameters:
maxRequestEntityLength- Maximum length of the request entity.
-
-
Method Details
-
startHttpServer
Starts the HTTP Server.- Parameters:
httpPort- HTTP port.httpsPort- HTTPS secure port.sslContext-SSLContext. May benull.- Throws:
Exception- If fails to start the HTTP Server.
-
stopHttpServer
Stops the HTTP server.- Throws:
Exception- If fails to stop the HTTP Server.
-
service
protected abstract ProcessManager service(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.HttpRequest request) throws Exception Services theHttpRequest.- Parameters:
context-ChannelHandlerContext.request-HttpRequest.- Returns:
ProcessManager.- Throws:
Exception- If fails to service theHttpRequest.
-