Class HttpServerImpl
- java.lang.Object
-
- com.github.toolarium.network.server.impl.HttpServerImpl
-
- All Implemented Interfaces:
IHttpServer
public class HttpServerImpl extends java.lang.Object implements IHttpServer
Defines a http serverNIO: see samples http://www.java2s.com/example/java/network/echo-server-via-serversocketchannel.html http://www.java2s.com/example/java/network/echo-client-via-socketchannel.html
-
-
Constructor Summary
Constructors Constructor Description HttpServerImpl()Constructor for HttpServer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IHttpServerInformationgetHttpServerInformation()Get the http server informationvoidinit(IHttpServerLogger httpServerLogger, IHttpAccessLogger httpAccessLogger)Initialise http servervoidstart(IHttpService inputHttpService, int port)Start the servervoidstart(IHttpService inputHttpService, int port, javax.net.ssl.SSLContext sslContext)Start the servervoidstop()Stop the server
-
-
-
Method Detail
-
init
public void init(IHttpServerLogger httpServerLogger, IHttpAccessLogger httpAccessLogger)
Description copied from interface:IHttpServerInitialise http server- Specified by:
initin interfaceIHttpServer- Parameters:
httpServerLogger- the server loggerhttpAccessLogger- the access logger- See Also:
IHttpServer.init(com.github.toolarium.network.server.logger.IHttpServerLogger, com.github.toolarium.network.server.logger.IHttpAccessLogger)
-
start
public void start(IHttpService inputHttpService, int port) throws java.io.IOException
Description copied from interface:IHttpServerStart the server- Specified by:
startin interfaceIHttpServer- Parameters:
inputHttpService- the http serviceport- the port- Throws:
java.io.IOException- In case of an I/O error- See Also:
IHttpServer.start(com.github.toolarium.network.server.service.IHttpService, int)
-
start
public void start(IHttpService inputHttpService, int port, javax.net.ssl.SSLContext sslContext) throws java.io.IOException
Description copied from interface:IHttpServerStart the server- Specified by:
startin interfaceIHttpServer- Parameters:
inputHttpService- the http serviceport- the portsslContext- the ssl context- Throws:
java.io.IOException- In case of an I/O error- See Also:
IHttpServer.start(com.github.toolarium.network.server.service.IHttpService, int, javax.net.ssl.SSLContext)
-
stop
public void stop() throws java.io.IOExceptionDescription copied from interface:IHttpServerStop the server- Specified by:
stopin interfaceIHttpServer- Throws:
java.io.IOException- In case of an I/O error- See Also:
IHttpServer.stop()
-
getHttpServerInformation
public IHttpServerInformation getHttpServerInformation()
Description copied from interface:IHttpServerGet the http server information- Specified by:
getHttpServerInformationin interfaceIHttpServer- Returns:
- the http server information
- See Also:
IHttpServer.getHttpServerInformation()
-
-