Class AbstractNettyHttpServer
- java.lang.Object
-
- net.officefloor.server.http.netty.AbstractNettyHttpServer
-
- Direct Known Subclasses:
NettyHttpServerImplementation
public abstract class AbstractNettyHttpServer extends java.lang.ObjectAbstract Netty HTTP server.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractNettyHttpServer(int maxRequestEntityLength)Instantiate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ProcessManagerservice(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.HttpRequest request)Services theHttpRequest.voidstartHttpServer(int httpPort, int httpsPort, javax.net.ssl.SSLContext sslContext)Starts the HTTP Server.voidstopHttpServer()Stops the HTTP server.
-
-
-
Method Detail
-
startHttpServer
public void startHttpServer(int httpPort, int httpsPort, javax.net.ssl.SSLContext sslContext) throws java.lang.ExceptionStarts the HTTP Server.- Parameters:
httpPort- HTTP port.httpsPort- HTTPS secure port.sslContext-SSLContext. May benull.- Throws:
java.lang.Exception- If fails to start the HTTP Server.
-
stopHttpServer
public void stopHttpServer() throws java.lang.ExceptionStops the HTTP server.- Throws:
java.lang.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 java.lang.Exception
Services theHttpRequest.- Parameters:
context-ChannelHandlerContext.request-HttpRequest.- Returns:
ProcessManager.- Throws:
java.lang.Exception- If fails to service theHttpRequest.
-
-