Class AbstractHttpService
java.lang.Object
com.github.toolarium.network.server.service.AbstractHttpService
- All Implemented Interfaces:
IHttpService
- Direct Known Subclasses:
EchoService,PingService
Abstract base http service class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the http connection handlerprotected StringGet the current time stamp in RFC 1123 formatprotected HttpReponseprepareResponse(IHttpRequest request) Prepare responsebooleanstart(IHttpServerLogger httpServerLogger, int port) Start the servicevoidstop(IHttpServerLogger httpServerLogger, int port) Stops the serviceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.toolarium.network.server.service.IHttpService
processRequest
-
Constructor Details
-
AbstractHttpService
public AbstractHttpService()
-
-
Method Details
-
start
Description copied from interface:IHttpServiceStart the service- Specified by:
startin interfaceIHttpService- Parameters:
httpServerLogger- the server loggerport- the port- Returns:
- true to continue startup; otherwise stop startup
- See Also:
-
stop
Description copied from interface:IHttpServiceStops the service- Specified by:
stopin interfaceIHttpService- Parameters:
httpServerLogger- the server loggerport- the port- See Also:
-
getHttpConnectionHandler
Description copied from interface:IHttpServiceGet the http connection handler- Specified by:
getHttpConnectionHandlerin interfaceIHttpService- Returns:
- the http connection handler
- See Also:
-
prepareResponse
Prepare response- Parameters:
request- the request- Returns:
- the response
-
getRFC1123Timestamp
Get the current time stamp in RFC 1123 format- Returns:
- the current time stamp in RFC 1123 format
-