B
- The Http body typepublic class HttpRequestWrapper<B> extends HttpMessageWrapper<B> implements HttpRequest<B>
HttpRequest
.SCHEME_HTTP, SCHEME_HTTPS
Constructor and Description |
---|
HttpRequestWrapper(HttpRequest<B> delegate) |
Modifier and Type | Method and Description |
---|---|
Collection<MediaType> |
accept()
A list of accepted
MediaType instances sorted by their quality rating. |
Optional<Certificate> |
getCertificate()
Retrieves the Certificate used for mutual authentication.
|
Cookies |
getCookies() |
HttpRequest<B> |
getDelegate() |
HttpVersion |
getHttpVersion() |
Optional<Locale> |
getLocale() |
HttpMethod |
getMethod() |
String |
getMethodName() |
HttpParameters |
getParameters() |
String |
getPath() |
InetSocketAddress |
getRemoteAddress() |
InetSocketAddress |
getServerAddress() |
String |
getServerName() |
URI |
getUri() |
Optional<Principal> |
getUserPrincipal()
The user principal stored within the request.
|
<T extends Principal> |
getUserPrincipal(Class<T> principalType)
The user principal stored within the request.
|
boolean |
isSecure() |
HttpRequest<B> |
setAttribute(CharSequence name,
Object value)
Sets an attribute on the message.
|
getAttributes, getBody, getBody, getBody, getHeaders
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create, DELETE, DELETE, DELETE, DELETE, GET, GET, HEAD, HEAD, mutate, OPTIONS, OPTIONS, PATCH, PATCH, POST, POST, PUT, PUT
getAttributes, getBody, getBody, getBody, getCharacterEncoding, getContentLength, getContentType, getHeaders
removeAttribute
getAttribute, getAttribute
public HttpRequestWrapper(HttpRequest<B> delegate)
delegate
- The Http Requestpublic HttpRequest<B> getDelegate()
getDelegate
in class HttpMessageWrapper<B>
public HttpVersion getHttpVersion()
getHttpVersion
in interface HttpRequest<B>
public Collection<MediaType> accept()
HttpRequest
MediaType
instances sorted by their quality rating.accept
in interface HttpRequest<B>
MediaType
instances@NonNull public Optional<Principal> getUserPrincipal()
HttpRequest
getUserPrincipal
in interface HttpRequest<B>
@NonNull public <T extends Principal> Optional<T> getUserPrincipal(Class<T> principalType)
HttpRequest
getUserPrincipal
in interface HttpRequest<B>
T
- The principal typeprincipalType
- The principal typepublic HttpRequest<B> setAttribute(CharSequence name, Object value)
MutableAttributeHolder
setAttribute
in interface MutableAttributeHolder
setAttribute
in interface HttpMessage<B>
setAttribute
in interface HttpRequest<B>
name
- The name of the attributevalue
- The value of the attributepublic Optional<Locale> getLocale()
getLocale
in interface HttpMessage<B>
getLocale
in interface HttpRequest<B>
public Optional<Certificate> getCertificate()
HttpRequest
getCertificate
in interface HttpRequest<B>
public Cookies getCookies()
getCookies
in interface HttpRequest<B>
Cookies
instancepublic HttpParameters getParameters()
getParameters
in interface HttpRequest<B>
public HttpMethod getMethod()
getMethod
in interface HttpRequest<B>
public String getMethodName()
getMethodName
in interface HttpRequest<B>
HttpMethod
value for standard http methods).public URI getUri()
getUri
in interface HttpRequest<B>
public String getPath()
getPath
in interface HttpRequest<B>
public InetSocketAddress getRemoteAddress()
getRemoteAddress
in interface HttpRequest<B>
public InetSocketAddress getServerAddress()
getServerAddress
in interface HttpRequest<B>
public String getServerName()
getServerName
in interface HttpRequest<B>
public boolean isSecure()
isSecure
in interface HttpRequest<B>