public class ServletServerHttpRequest extends Object implements ServerHttpRequest
ServerHttpRequest implementation that is based on a HttpServletRequest.| Modifier and Type | Field and Description |
|---|---|
protected static String |
FORM_CHARSET |
protected static String |
FORM_CONTENT_TYPE |
| Constructor and Description |
|---|
ServletServerHttpRequest(HttpServletRequest servletRequest)
Construct a new instance of the ServletServerHttpRequest based on the given
HttpServletRequest. |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getBody()
Return the body of the message as an input stream.
|
Cookies |
getCookies()
TODO ..
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
HttpMethod |
getMethod()
Return the HTTP method of the request.
|
Principal |
getPrincipal()
Return a
Principal instance containing the name of the
authenticated user. |
MultiValueMap<String,String> |
getQueryParams()
Returns the map of query parameters.
|
String |
getRemoteAddress()
Return the IP address of the endpoint on the other end.
|
String |
getRemoteHostName()
Return the host name of the endpoint on the other end.
|
HttpServletRequest |
getServletRequest()
Returns the
HttpServletRequest this object is based on. |
URI |
getURI()
Return the URI of the request.
|
protected static final String FORM_CONTENT_TYPE
protected static final String FORM_CHARSET
public ServletServerHttpRequest(HttpServletRequest servletRequest)
HttpServletRequest.servletRequest - the servlet requestpublic HttpServletRequest getServletRequest()
HttpServletRequest this object is based on.public HttpMethod getMethod()
HttpRequestgetMethod in interface HttpRequestpublic URI getURI()
HttpRequestgetURI in interface HttpRequestpublic HttpHeaders getHeaders()
HttpMessagegetHeaders in interface HttpMessagepublic Principal getPrincipal()
ServerHttpRequestPrincipal instance containing the name of the
authenticated user. If the user has not been authenticated, the method returns
null.getPrincipal in interface ServerHttpRequestpublic String getRemoteHostName()
ServerHttpRequestgetRemoteHostName in interface ServerHttpRequestpublic String getRemoteAddress()
ServerHttpRequestgetRemoteAddress in interface ServerHttpRequestpublic Cookies getCookies()
HttpMessagegetCookies in interface HttpMessagepublic MultiValueMap<String,String> getQueryParams()
ServerHttpRequestgetQueryParams in interface ServerHttpRequestpublic InputStream getBody() throws IOException
HttpInputMessagegetBody in interface HttpInputMessageIOException - in case of I/O Errors