Package net.officefloor.server.http
Class AbstractHttpServicerFactory
- java.lang.Object
-
- net.officefloor.server.http.AbstractHttpServicerFactory
-
- All Implemented Interfaces:
RequestServicerFactory<HttpRequestParser>
,SocketServicerFactory<HttpRequestParser>
public abstract class AbstractHttpServicerFactory extends java.lang.Object implements SocketServicerFactory<HttpRequestParser>, RequestServicerFactory<HttpRequestParser>
SocketServicerFactory
andRequestServicerFactory
to use theHttpRequestParser
to produceServerHttpConnection
instances for servicing.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AbstractHttpServicerFactory(HttpServerLocation serverLocation, boolean isSecure, HttpRequestParser.HttpRequestParserMetaData metaData, HttpHeaderValue serverName, DateHttpHeaderClock dateHttpHeaderClock, boolean isIncludeEscalationStackTrace)
Instantiate.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description RequestServicer<HttpRequestParser>
createRequestServicer(SocketServicer<HttpRequestParser> socketServicer)
Creates theRequestServicer
for theSocketServicer
.SocketServicer<HttpRequestParser>
createSocketServicer(RequestHandler<HttpRequestParser> requestHandler)
Creates theSocketServicer
.protected abstract ProcessManager
service(ProcessAwareServerHttpConnectionManagedObject<java.nio.ByteBuffer> connection)
Services theProcessAwareServerHttpConnectionManagedObject
.
-
-
-
Constructor Detail
-
AbstractHttpServicerFactory
public AbstractHttpServicerFactory(HttpServerLocation serverLocation, boolean isSecure, HttpRequestParser.HttpRequestParserMetaData metaData, HttpHeaderValue serverName, DateHttpHeaderClock dateHttpHeaderClock, boolean isIncludeEscalationStackTrace)
Instantiate.- Parameters:
serverLocation
-HttpServerLocation
.isSecure
- Indicates if over secureSocket
.metaData
-HttpRequestParser.HttpRequestParserMetaData
.serverName
-Server
HttpHeaderValue
.dateHttpHeaderClock
-DateHttpHeaderClock
.isIncludeEscalationStackTrace
- Indicates whether to include theEscalation
stack trace inHttpResponse
.
-
-
Method Detail
-
service
protected abstract ProcessManager service(ProcessAwareServerHttpConnectionManagedObject<java.nio.ByteBuffer> connection) throws java.io.IOException, HttpException
Services theProcessAwareServerHttpConnectionManagedObject
.- Parameters:
connection
-ProcessAwareServerHttpConnectionManagedObject
.- Returns:
ProcessManager
to servicing theProcessAwareServerHttpConnectionManagedObject
.- Throws:
java.io.IOException
- If IO failure.HttpException
- If HTTP failure.
-
createSocketServicer
public SocketServicer<HttpRequestParser> createSocketServicer(RequestHandler<HttpRequestParser> requestHandler)
Description copied from interface:SocketServicerFactory
Creates theSocketServicer
.- Specified by:
createSocketServicer
in interfaceSocketServicerFactory<HttpRequestParser>
- Parameters:
requestHandler
-RequestHandler
.- Returns:
SocketServicer
.
-
createRequestServicer
public RequestServicer<HttpRequestParser> createRequestServicer(SocketServicer<HttpRequestParser> socketServicer)
Description copied from interface:RequestServicerFactory
Creates theRequestServicer
for theSocketServicer
.- Specified by:
createRequestServicer
in interfaceRequestServicerFactory<HttpRequestParser>
- Parameters:
socketServicer
-SocketServicer
.- Returns:
RequestServicer
.
-
-