public class ServletServerHttpRequest extends java.lang.Object implements ServerHttpRequest
ServerHttpRequest
implementation that is based on a HttpServletRequest
.Modifier and Type | Field and Description |
---|---|
protected static java.nio.charset.Charset |
FORM_CHARSET |
protected static java.lang.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 |
---|---|
ServerHttpAsyncRequestControl |
getAsyncRequestControl(ServerHttpResponse response)
Return a control that allows putting the request in asynchronous mode so the
response remains open until closed explicitly from the current or another thread.
|
java.io.InputStream |
getBody()
Return the body of the message as an input stream.
|
HttpHeaders |
getHeaders()
Return the headers of this message.
|
java.net.InetSocketAddress |
getLocalAddress()
Return the address on which the request was received.
|
java.lang.String |
getMethodValue()
Return the HTTP method of the request as a String
|
java.security.Principal |
getPrincipal()
Return a
Principal instance containing the name of the
authenticated user. |
java.net.InetSocketAddress |
getRemoteAddress()
Return the address of the remote client.
|
HttpServletRequest |
getServletRequest()
Returns the
HttpServletRequest this object is based on. |
java.net.URI |
getURI()
Return the URI of the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMethod
protected static final java.lang.String FORM_CONTENT_TYPE
protected static final java.nio.charset.Charset FORM_CHARSET
public ServletServerHttpRequest(HttpServletRequest servletRequest)
HttpServletRequest
.servletRequest
- the servlet requestpublic HttpServletRequest getServletRequest()
HttpServletRequest
this object is based on.public java.lang.String getMethodValue()
HttpRequest
getMethodValue
in interface HttpRequest
public java.net.URI getURI()
HttpRequest
getURI
in interface HttpRequest
null
)public HttpHeaders getHeaders()
HttpMessage
getHeaders
in interface HttpMessage
null
)public java.security.Principal getPrincipal()
ServerHttpRequest
Principal
instance containing the name of the
authenticated user. If the user has not been authenticated, the method returns
null
.getPrincipal
in interface ServerHttpRequest
public java.net.InetSocketAddress getLocalAddress()
ServerHttpRequest
getLocalAddress
in interface ServerHttpRequest
public java.net.InetSocketAddress getRemoteAddress()
ServerHttpRequest
getRemoteAddress
in interface ServerHttpRequest
public java.io.InputStream getBody() throws java.io.IOException
HttpInputMessage
getBody
in interface HttpInputMessage
null
)java.io.IOException
- in case of I/O Errorspublic ServerHttpAsyncRequestControl getAsyncRequestControl(ServerHttpResponse response)
ServerHttpRequest
getAsyncRequestControl
in interface ServerHttpRequest