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 clientWe have this abstraction so that we can reuse marshalling objects in a client framework and serverside framework
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected SynchronousDispatcherdispatcherprotected SynchronousExecutionContextexecutionContextprotected ResteasyHttpHeadershttpHeadersprotected StringhttpMethodprotected HttpResponsehttpResponseprotected InputStreamoverridenStreamprotected javax.servlet.http.HttpServletRequestrequestprotected javax.servlet.ServletContextservletContextprotected javax.servlet.http.HttpServletResponseservletResponseprotected booleanwasForwarded-
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, String httpMethod, SynchronousDispatcher dispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanformParametersRead()Were form parameters read before marshalling to body?voidforward(String path)ResteasyAsynchronousContextgetAsyncContext()ObjectgetAttribute(String attribute)Map of contextual data.Enumeration<String>getAttributeNames()javax.ws.rs.core.MultivaluedMap<String,String>getDecodedFormParameters()javax.ws.rs.core.MultivaluedMap<String,String>getFormParameters()application/x-www-form-urlencoded parametersjavax.ws.rs.core.HttpHeadersgetHttpHeaders()StringgetHttpMethod()InputStreamgetInputStream()javax.ws.rs.core.MultivaluedMap<String,String>getMutableHeaders()javax.ws.rs.core.MultivaluedMap<String,String>getPutDecodedFormParameters()javax.ws.rs.core.MultivaluedMap<String,String>getPutFormParameters()StringgetRemoteAddress()Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.StringgetRemoteHost()Returns the fully qualified name of the client or the last proxy that sent the request.protected booleanmapEquals(Map<String,String[]> parameterMap, javax.ws.rs.core.MultivaluedMap<String,String> queryMap)voidremoveAttribute(String name)voidsetAttribute(String name, Object value)voidsetHttpMethod(String method)voidsetInputStream(InputStream stream)If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().booleanwasForwarded()-
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 String httpMethod
-
overridenStream
protected 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, String httpMethod, SynchronousDispatcher dispatcher)
-
-
Method Detail
-
getPutDecodedFormParameters
public javax.ws.rs.core.MultivaluedMap<String,String> getPutDecodedFormParameters()
-
getAttribute
public Object getAttribute(String attribute)
Description copied from interface:HttpRequestMap of contextual data. Similar to HttpServletRequest attributes- Parameters:
attribute- attribute name- Returns:
- attribute
-
removeAttribute
public void removeAttribute(String name)
-
getAttributeNames
public Enumeration<String> getAttributeNames()
-
getFormParameters
public javax.ws.rs.core.MultivaluedMap<String,String> getFormParameters()
Description copied from interface:HttpRequestapplication/x-www-form-urlencoded parametersThis is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
- Specified by:
getFormParametersin interfaceHttpRequest- Overrides:
getFormParametersin classBaseHttpRequest- Returns:
- null if no parameters, this is encoded map
-
getDecodedFormParameters
public javax.ws.rs.core.MultivaluedMap<String,String> getDecodedFormParameters()
- Specified by:
getDecodedFormParametersin interfaceHttpRequest- Overrides:
getDecodedFormParametersin classBaseHttpRequest
-
formParametersRead
public boolean formParametersRead()
Description copied from interface:HttpRequestWere form parameters read before marshalling to body?- Specified by:
formParametersReadin interfaceHttpRequest- Overrides:
formParametersReadin classBaseHttpRequest- Returns:
-
getHttpHeaders
public javax.ws.rs.core.HttpHeaders getHttpHeaders()
-
getInputStream
public InputStream getInputStream()
-
setInputStream
public void setInputStream(InputStream stream)
Description copied from interface:HttpRequestIf you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream(). It will only override it for the resteasy HttpRequest- Parameters:
stream- input stream
-
getHttpMethod
public String getHttpMethod()
-
setHttpMethod
public void setHttpMethod(String method)
-
getAsyncContext
public ResteasyAsynchronousContext getAsyncContext()
-
forward
public void forward(String path)
-
wasForwarded
public boolean wasForwarded()
-
mapEquals
protected boolean mapEquals(Map<String,String[]> parameterMap, javax.ws.rs.core.MultivaluedMap<String,String> queryMap)
-
getRemoteHost
public String getRemoteHost()
Description copied from interface:HttpRequestReturns the fully qualified name of the client or the last proxy that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address.- Returns:
- a
Stringcontaining the fully qualified name of the client
-
getRemoteAddress
public String getRemoteAddress()
Description copied from interface:HttpRequestReturns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Returns:
- a
Stringcontaining the IP address of the client that sent the request
-
-