Class HttpConnectionHandlerImpl
- java.lang.Object
-
- com.github.toolarium.network.server.handler.impl.AbstractConnectionHandler
-
- com.github.toolarium.network.server.handler.impl.HttpConnectionHandlerImpl
-
- All Implemented Interfaces:
IHttpConnectionHandler,java.lang.Runnable
public class HttpConnectionHandlerImpl extends AbstractConnectionHandler
Implements a server http connection handler
-
-
Constructor Summary
Constructors Constructor Description HttpConnectionHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IHttpRequestbuildHttpRequest(java.io.BufferedReader reader)Build the http requestvoidinit(java.net.Socket socket, IHttpService httpService, IHttpServerInformation httpServerInformation, IHttpServerLogger httpServerLogger, IHttpAccessLogger httpAccessLogger)Initialise the connection handlervoidrun()-
Methods inherited from class com.github.toolarium.network.server.handler.impl.AbstractConnectionHandler
createHttpResponse, getBodyAsByteArray, getStatusLineAndHeaders, readInBody, readInFirstLine
-
-
-
-
Method Detail
-
init
public void init(java.net.Socket socket, IHttpService httpService, IHttpServerInformation httpServerInformation, IHttpServerLogger httpServerLogger, IHttpAccessLogger httpAccessLogger)Description copied from interface:IHttpConnectionHandlerInitialise the connection handler- Parameters:
socket- the sockethttpService- the http servicehttpServerInformation- the http server informationhttpServerLogger- the http server loggerhttpAccessLogger- the http access logger- See Also:
IHttpConnectionHandler.init(java.net.Socket, com.github.toolarium.network.server.service.IHttpService, com.github.toolarium.network.server.dto.IHttpServerInformation, com.github.toolarium.network.server.logger.IHttpServerLogger, com.github.toolarium.network.server.logger.IHttpAccessLogger)
-
run
public void run()
- See Also:
Runnable.run()
-
buildHttpRequest
protected IHttpRequest buildHttpRequest(java.io.BufferedReader reader) throws java.io.IOException
Build the http request- Parameters:
reader- the reader- Returns:
- the http request
- Throws:
java.io.IOException- In case of an I/O error
-
-