Class HttpServletInputMessage
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.BaseHttpRequest
-
- org.jboss.resteasy.plugins.server.servlet.HttpServletInputMessage
-
- All Implemented Interfaces:
HttpRequest
- Direct Known Subclasses:
Servlet3AsyncHttpRequest
public class HttpServletInputMessage extends BaseHttpRequest
Abstraction for an inbound http request on the server, or a response from a server to a client We have this abstraction so that we can reuse marshalling objects in a client framework and serverside framework- Version:
- $Revision: 1 $
-
-
Field Summary
Fields Modifier and Type Field Description protected SynchronousDispatcher
dispatcher
protected SynchronousExecutionContext
executionContext
protected ResteasyHttpHeaders
httpHeaders
protected java.lang.String
httpMethod
protected HttpResponse
httpResponse
protected java.io.InputStream
overridenStream
protected javax.servlet.http.HttpServletRequest
request
protected javax.servlet.ServletContext
servletContext
protected javax.servlet.http.HttpServletResponse
servletResponse
protected boolean
wasForwarded
-
Fields inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest
decodedFormParameters, formParameters, uri
-
-
Constructor Summary
Constructors Constructor Description HttpServletInputMessage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse servletResponse, javax.servlet.ServletContext servletContext, HttpResponse httpResponse, ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, java.lang.String httpMethod, SynchronousDispatcher dispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forward(java.lang.String path)
ResteasyAsynchronousContext
getAsyncContext()
java.lang.Object
getAttribute(java.lang.String attribute)
Map of contextual data.java.util.Enumeration<java.lang.String>
getAttributeNames()
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
getDecodedFormParameters()
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
getFormParameters()
application/x-www-form-urlencoded parametersjavax.ws.rs.core.HttpHeaders
getHttpHeaders()
java.lang.String
getHttpMethod()
java.io.InputStream
getInputStream()
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
getMutableHeaders()
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
getPutDecodedFormParameters()
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String>
getPutFormParameters()
protected boolean
mapEquals(java.util.Map<java.lang.String,java.lang.String[]> parameterMap, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryMap)
void
removeAttribute(java.lang.String name)
void
setAttribute(java.lang.String name, java.lang.Object value)
void
setHttpMethod(java.lang.String method)
void
setInputStream(java.io.InputStream stream)
If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().boolean
wasForwarded()
-
Methods inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest
getUri, isInitial, setRequestUri, setRequestUri
-
-
-
-
Field Detail
-
httpHeaders
protected ResteasyHttpHeaders httpHeaders
-
request
protected javax.servlet.http.HttpServletRequest request
-
servletResponse
protected javax.servlet.http.HttpServletResponse servletResponse
-
servletContext
protected javax.servlet.ServletContext servletContext
-
dispatcher
protected SynchronousDispatcher dispatcher
-
httpResponse
protected HttpResponse httpResponse
-
httpMethod
protected java.lang.String httpMethod
-
overridenStream
protected java.io.InputStream overridenStream
-
executionContext
protected SynchronousExecutionContext executionContext
-
wasForwarded
protected boolean wasForwarded
-
-
Constructor Detail
-
HttpServletInputMessage
public HttpServletInputMessage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse servletResponse, javax.servlet.ServletContext servletContext, HttpResponse httpResponse, ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, java.lang.String httpMethod, SynchronousDispatcher dispatcher)
-
-
Method Detail
-
getMutableHeaders
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getMutableHeaders()
-
getPutFormParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getPutFormParameters()
-
getPutDecodedFormParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getPutDecodedFormParameters()
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attribute)
Description copied from interface:HttpRequest
Map of contextual data. Similar to HttpServletRequest attributes- Returns:
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)
-
removeAttribute
public void removeAttribute(java.lang.String name)
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
-
getFormParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getFormParameters()
Description copied from interface:HttpRequest
application/x-www-form-urlencoded parameters This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream- Specified by:
getFormParameters
in interfaceHttpRequest
- Overrides:
getFormParameters
in classBaseHttpRequest
- Returns:
- null if no parameters, this is encoded map
-
getDecodedFormParameters
public javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> getDecodedFormParameters()
- Specified by:
getDecodedFormParameters
in interfaceHttpRequest
- Overrides:
getDecodedFormParameters
in classBaseHttpRequest
-
getHttpHeaders
public javax.ws.rs.core.HttpHeaders getHttpHeaders()
-
getInputStream
public java.io.InputStream getInputStream()
-
setInputStream
public void setInputStream(java.io.InputStream stream)
Description copied from interface:HttpRequest
If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest
-
getHttpMethod
public java.lang.String getHttpMethod()
-
setHttpMethod
public void setHttpMethod(java.lang.String method)
-
getAsyncContext
public ResteasyAsynchronousContext getAsyncContext()
-
forward
public void forward(java.lang.String path)
-
wasForwarded
public boolean wasForwarded()
-
mapEquals
protected boolean mapEquals(java.util.Map<java.lang.String,java.lang.String[]> parameterMap, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryMap)
-
-