Package net.officefloor.server.http.impl
Class SerialisableHttpRequest
java.lang.Object
net.officefloor.server.http.impl.SerialisableHttpRequest
- All Implemented Interfaces:
Serializable,HttpRequest
- Author:
- Daniel Sagenschneider
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSerialisableHttpRequest(HttpMethod method, String requestUri, HttpVersion version, SerialisableHttpRequestHeaders headers, HttpRequestCookies cookies, ByteArrayByteSequence entity) Instantiate.SerialisableHttpRequest(HttpRequest request, HttpRequestCookies cookies, ByteSequence entity) Instantiate from existingHttpRequest. -
Method Summary
Modifier and TypeMethodDescriptioncreateHttpRequest(HttpVersion clientHttpVersion, HttpRequestCookies cookies) Creates aSerialisableHttpRequestfrom thisSerializablestate.Obtains theHttpRequestCookies.Obtains theServerInputStreamto the entity of the HTTP request.protected ByteSequenceObtains theByteSequencefor the entity.Obtains theHttpRequestHeaders.Obtains theHttpMethod.getUri()Obtains the request URI as provided on the request.Obtains theHttpVersion.
-
Constructor Details
-
SerialisableHttpRequest
public SerialisableHttpRequest(HttpRequest request, HttpRequestCookies cookies, ByteSequence entity) Instantiate from existingHttpRequest.- Parameters:
request-HttpRequest.cookies-HttpRequestCookies.entity-ByteSequenceto entity ofHttpRequest.
-
SerialisableHttpRequest
public SerialisableHttpRequest(HttpMethod method, String requestUri, HttpVersion version, SerialisableHttpRequestHeaders headers, HttpRequestCookies cookies, ByteArrayByteSequence entity) Instantiate.- Parameters:
method-HttpMethod.requestUri- Request URI.version-HttpVersion.headers-SerialisableHttpRequestHeaders.cookies-HttpRequestCookies.entity-ByteArrayByteSequencefor the entity.
-
-
Method Details
-
createHttpRequest
public SerialisableHttpRequest createHttpRequest(HttpVersion clientHttpVersion, HttpRequestCookies cookies) Creates aSerialisableHttpRequestfrom thisSerializablestate.- Parameters:
clientHttpVersion-HttpVersionthat the client is currently using.cookies-HttpRequestCookies.- Returns:
SerialisableHttpRequest.
-
getEntityByteSequence
Obtains theByteSequencefor the entity.- Returns:
ByteSequencefor the entity.
-
getMethod
Description copied from interface:HttpRequestObtains theHttpMethod.- Specified by:
getMethodin interfaceHttpRequest- Returns:
HttpMethod.
-
getUri
Description copied from interface:HttpRequestObtains the request URI as provided on the request.- Specified by:
getUriin interfaceHttpRequest- Returns:
- Request URI as provided on the request.
-
getVersion
Description copied from interface:HttpRequestObtains theHttpVersion.- Specified by:
getVersionin interfaceHttpRequest- Returns:
HttpVersion.
-
getHeaders
Description copied from interface:HttpRequestObtains theHttpRequestHeaders.- Specified by:
getHeadersin interfaceHttpRequest- Returns:
HttpRequestHeaders.
-
getCookies
Description copied from interface:HttpRequestObtains theHttpRequestCookies.- Specified by:
getCookiesin interfaceHttpRequest- Returns:
HttpRequestCookies.
-
getEntity
Description copied from interface:HttpRequestObtains theServerInputStreamto the entity of the HTTP request.- Specified by:
getEntityin interfaceHttpRequest- Returns:
ServerInputStreamto the entity of the HTTP request.
-