Package net.officefloor.server.http.impl
Class MaterialisingHttpRequest
- java.lang.Object
-
- net.officefloor.server.http.impl.MaterialisingHttpRequest
-
- All Implemented Interfaces:
HttpRequest
public class MaterialisingHttpRequest extends java.lang.Object implements HttpRequest
HttpRequest
implementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description MaterialisingHttpRequest(java.util.function.Supplier<HttpMethod> methodSupplier, java.util.function.Supplier<java.lang.String> requestUriSupplier, HttpVersion version, HttpRequestHeaders headers, HttpRequestCookies cookies, ByteSequence entity)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpRequestCookies
getCookies()
Obtains theHttpRequestCookies
.ServerInputStream
getEntity()
Obtains theServerInputStream
to the entity of the HTTP request.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
-
MaterialisingHttpRequest
public MaterialisingHttpRequest(java.util.function.Supplier<HttpMethod> methodSupplier, java.util.function.Supplier<java.lang.String> requestUriSupplier, HttpVersion version, HttpRequestHeaders headers, HttpRequestCookies cookies, ByteSequence entity)
Instantiate.- Parameters:
methodSupplier
-Supplier
for theHttpMethod
.requestUriSupplier
-Supplier
for the request URI.version
-HttpVersion
.headers
-HttpRequestHeaders
.cookies
-HttpRequestCookies
.entity
-ByteSequence
for the HTTP entity.
-
-
Method Detail
-
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.
-
-