Package org.jboss.resteasy.spi
Interface HttpRequest
-
- All Known Implementing Classes:
BaseHttpRequest,DelegatingHttpRequest,HttpServerRequest,HttpServletInputMessage,MockHttpRequest,NettyHttpRequest,PrefixedFormFieldsHttpRequest,Servlet3AsyncHttpRequest,VertxHttpRequest
public interface HttpRequestBridge interface between the base Resteasy JAX-RS implementation and the actual HTTP transport (i.e. a servlet container)- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Method Summary
All Methods Instance Methods Abstract 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()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.javax.ws.rs.core.UriInfogetUri()This method *MUST* always return the same instance.booleanisInitial()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().voidsetRequestUri(URI requestUri)Updates the object returned bygetUri().voidsetRequestUri(URI baseUri, URI requestUri)Updates the object returned bygetUri().booleanwasForwarded()
-
-
-
Method Detail
-
getHttpHeaders
javax.ws.rs.core.HttpHeaders getHttpHeaders()
-
getInputStream
InputStream getInputStream()
-
setInputStream
void setInputStream(InputStream stream)
If 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
-
getUri
javax.ws.rs.core.UriInfo getUri()
This method *MUST* always return the same instance.- Returns:
- uri info
-
getHttpMethod
String getHttpMethod()
-
setHttpMethod
void setHttpMethod(String method)
-
setRequestUri
void setRequestUri(URI requestUri) throws IllegalStateException
Updates the object returned bygetUri().- Parameters:
requestUri- request uri- Throws:
IllegalStateException
-
setRequestUri
void setRequestUri(URI baseUri, URI requestUri) throws IllegalStateException
Updates the object returned bygetUri().- Parameters:
baseUri- base urirequestUri- request uri- Throws:
IllegalStateException
-
getFormParameters
javax.ws.rs.core.MultivaluedMap<String,String> getFormParameters()
application/x-www-form-urlencoded parametersThis is here because @FormParam needs it and for when there are servlet filters that eat up the input stream
- Returns:
- null if no parameters, this is encoded map
-
formParametersRead
boolean formParametersRead()
Were form parameters read before marshalling to body?- Returns:
-
getAttribute
Object getAttribute(String attribute)
Map of contextual data. Similar to HttpServletRequest attributes- Parameters:
attribute- attribute name- Returns:
- attribute
-
removeAttribute
void removeAttribute(String name)
-
getAttributeNames
Enumeration<String> getAttributeNames()
-
getAsyncContext
ResteasyAsynchronousContext getAsyncContext()
-
isInitial
boolean isInitial()
-
forward
void forward(String path)
-
wasForwarded
boolean wasForwarded()
-
getRemoteAddress
String getRemoteAddress()
Returns 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
-
getRemoteHost
String getRemoteHost()
Returns 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
-
-