Package net.officefloor.server.http.impl
Class SerialisableHttpRequest
- java.lang.Object
-
- net.officefloor.server.http.impl.SerialisableHttpRequest
-
- All Implemented Interfaces:
java.io.Serializable
,HttpRequest
public class SerialisableHttpRequest extends java.lang.Object implements HttpRequest, java.io.Serializable
Serializable
HttpRequest
.- Author:
- Daniel Sagenschneider
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SerialisableHttpRequest(HttpMethod method, java.lang.String requestUri, HttpVersion version, SerialisableHttpRequestHeaders headers, HttpRequestCookies cookies, ByteArrayByteSequence entity)
Instantiate.SerialisableHttpRequest(HttpRequest request, HttpRequestCookies cookies, ByteSequence entity)
Instantiate from existingHttpRequest
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerialisableHttpRequest
createHttpRequest(HttpVersion clientHttpVersion, HttpRequestCookies cookies)
Creates aSerialisableHttpRequest
from thisSerializable
state.HttpRequestCookies
getCookies()
Obtains theHttpRequestCookies
.ServerInputStream
getEntity()
Obtains theServerInputStream
to the entity of the HTTP request.protected ByteSequence
getEntityByteSequence()
Obtains theByteSequence
for the entity.HttpRequestHeaders
getHeaders()
Obtains theHttpRequestHeaders
.HttpMethod
getMethod()
Obtains theHttpMethod
.java.lang.String
getUri()
Obtains the request URI as provided on the request.HttpVersion
getVersion()
Obtains theHttpVersion
.
-
-
-
Constructor Detail
-
SerialisableHttpRequest
public SerialisableHttpRequest(HttpRequest request, HttpRequestCookies cookies, ByteSequence entity)
Instantiate from existingHttpRequest
.- Parameters:
request
-HttpRequest
.cookies
-HttpRequestCookies
.entity
-ByteSequence
to entity ofHttpRequest
.
-
SerialisableHttpRequest
public SerialisableHttpRequest(HttpMethod method, java.lang.String requestUri, HttpVersion version, SerialisableHttpRequestHeaders headers, HttpRequestCookies cookies, ByteArrayByteSequence entity)
Instantiate.- Parameters:
method
-HttpMethod
.requestUri
- Request URI.version
-HttpVersion
.headers
-SerialisableHttpRequestHeaders
.cookies
-HttpRequestCookies
.entity
-ByteArrayByteSequence
for the entity.
-
-
Method Detail
-
createHttpRequest
public SerialisableHttpRequest createHttpRequest(HttpVersion clientHttpVersion, HttpRequestCookies cookies)
Creates aSerialisableHttpRequest
from thisSerializable
state.- Parameters:
clientHttpVersion
-HttpVersion
that the client is currently using.cookies
-HttpRequestCookies
.- Returns:
SerialisableHttpRequest
.
-
getEntityByteSequence
protected ByteSequence getEntityByteSequence()
Obtains theByteSequence
for the entity.- Returns:
ByteSequence
for the entity.
-
getMethod
public HttpMethod getMethod()
Description copied from interface:HttpRequest
Obtains theHttpMethod
.- Specified by:
getMethod
in interfaceHttpRequest
- Returns:
HttpMethod
.
-
getUri
public java.lang.String getUri()
Description copied from interface:HttpRequest
Obtains the request URI as provided on the request.- Specified by:
getUri
in interfaceHttpRequest
- Returns:
- Request URI as provided on the request.
-
getVersion
public HttpVersion getVersion()
Description copied from interface:HttpRequest
Obtains theHttpVersion
.- Specified by:
getVersion
in interfaceHttpRequest
- Returns:
HttpVersion
.
-
getHeaders
public HttpRequestHeaders getHeaders()
Description copied from interface:HttpRequest
Obtains theHttpRequestHeaders
.- Specified by:
getHeaders
in interfaceHttpRequest
- Returns:
HttpRequestHeaders
.
-
getCookies
public HttpRequestCookies getCookies()
Description copied from interface:HttpRequest
Obtains theHttpRequestCookies
.- Specified by:
getCookies
in interfaceHttpRequest
- Returns:
HttpRequestCookies
.
-
getEntity
public ServerInputStream getEntity()
Description copied from interface:HttpRequest
Obtains theServerInputStream
to the entity of the HTTP request.- Specified by:
getEntity
in interfaceHttpRequest
- Returns:
ServerInputStream
to the entity of the HTTP request.
-
-