Package org.jboss.resteasy.spi
Interface HttpRequest
-
- All Known Implementing Classes:
BaseHttpRequest
,DelegatingHttpRequest
,HttpServerRequest
,HttpServletInputMessage
,MockHttpRequest
,NettyHttpRequest
,PrefixedFormFieldsHttpRequest
,Servlet3AsyncHttpRequest
,VertxHttpRequest
public interface HttpRequest
Bridge 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 boolean
formParametersRead()
Were form parameters read before marshalling to body?void
forward(String path)
ResteasyAsynchronousContext
getAsyncContext()
Object
getAttribute(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.HttpHeaders
getHttpHeaders()
String
getHttpMethod()
InputStream
getInputStream()
javax.ws.rs.core.MultivaluedMap<String,String>
getMutableHeaders()
String
getRemoteAddress()
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.String
getRemoteHost()
Returns the fully qualified name of the client or the last proxy that sent the request.javax.ws.rs.core.UriInfo
getUri()
This method *MUST* always return the same instance.boolean
isInitial()
void
removeAttribute(String name)
void
setAttribute(String name, Object value)
void
setHttpMethod(String method)
void
setInputStream(InputStream stream)
If you are using a servlet container, this will *NOT* override the HttpServletRequest.getInputStream().void
setRequestUri(URI requestUri)
Updates the object returned bygetUri()
.void
setRequestUri(URI baseUri, URI requestUri)
Updates the object returned bygetUri()
.boolean
wasForwarded()
-
-
-
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
String
containing 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
String
containing the fully qualified name of the client
-
-