Class DelegatingHttpRequest
java.lang.Object
org.jboss.resteasy.util.DelegatingHttpRequest
- All Implemented Interfaces:
HttpRequest
- Direct Known Subclasses:
PrefixedFormFieldsHttpRequest
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Were form parameters read before marshalling to body?void
getAttribute
(String attribute) Map of contextual data.Optional
<jakarta.ws.rs.core.EntityPart> getFormEntityPart
(String name) Returns the optional entity part for amultipart/form-data
request.List
<jakarta.ws.rs.core.EntityPart> Returns for entity parts for amultipart/form-data
request.application/x-www-form-urlencoded parametersjakarta.ws.rs.core.HttpHeaders
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.Returns the fully qualified name of the client or the last proxy that sent the request.jakarta.ws.rs.core.UriInfo
getUri()
This method *MUST* always return the same instance.boolean
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 byHttpRequest.getUri()
.void
setRequestUri
(URI baseUri, URI requestUri) Updates the object returned byHttpRequest.getUri()
.boolean
-
Constructor Details
-
DelegatingHttpRequest
-
-
Method Details
-
getMutableHeaders
- Specified by:
getMutableHeaders
in interfaceHttpRequest
-
setHttpMethod
- Specified by:
setHttpMethod
in interfaceHttpRequest
-
getUri
public jakarta.ws.rs.core.UriInfo getUri()Description copied from interface:HttpRequest
This method *MUST* always return the same instance.- Specified by:
getUri
in interfaceHttpRequest
- Returns:
- uri info
-
setRequestUri
Description copied from interface:HttpRequest
Updates the object returned byHttpRequest.getUri()
.- Specified by:
setRequestUri
in interfaceHttpRequest
- Parameters:
requestUri
- request uri- Throws:
IllegalStateException
-
setRequestUri
Description copied from interface:HttpRequest
Updates the object returned byHttpRequest.getUri()
.- Specified by:
setRequestUri
in interfaceHttpRequest
- Parameters:
baseUri
- base urirequestUri
- request uri- Throws:
IllegalStateException
-
getHttpHeaders
public jakarta.ws.rs.core.HttpHeaders getHttpHeaders()- Specified by:
getHttpHeaders
in interfaceHttpRequest
-
getInputStream
- Specified by:
getInputStream
in interfaceHttpRequest
-
setInputStream
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- Specified by:
setInputStream
in interfaceHttpRequest
- Parameters:
stream
- input stream
-
getHttpMethod
- Specified by:
getHttpMethod
in interfaceHttpRequest
-
getFormParameters
Description copied from interface:HttpRequest
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
- Specified by:
getFormParameters
in interfaceHttpRequest
- Returns:
- null if no parameters, this is encoded map
-
getDecodedFormParameters
- Specified by:
getDecodedFormParameters
in interfaceHttpRequest
-
getFormEntityParts
Description copied from interface:HttpRequest
Returns for entity parts for amultipart/form-data
request.- Specified by:
getFormEntityParts
in interfaceHttpRequest
- Returns:
- the entity parts or an empty list
-
getFormEntityPart
Description copied from interface:HttpRequest
Returns the optional entity part for amultipart/form-data
request.- Specified by:
getFormEntityPart
in interfaceHttpRequest
- Parameters:
name
- the name of the entity part- Returns:
- an optional entity part for the name
-
formParametersRead
public boolean formParametersRead()Description copied from interface:HttpRequest
Were form parameters read before marshalling to body?- Specified by:
formParametersRead
in interfaceHttpRequest
- Returns:
-
getAttribute
Description copied from interface:HttpRequest
Map of contextual data. Similar to HttpServletRequest attributes- Specified by:
getAttribute
in interfaceHttpRequest
- Parameters:
attribute
- attribute name- Returns:
- attribute
-
setAttribute
- Specified by:
setAttribute
in interfaceHttpRequest
-
removeAttribute
- Specified by:
removeAttribute
in interfaceHttpRequest
-
getAttributeNames
- Specified by:
getAttributeNames
in interfaceHttpRequest
-
isInitial
public boolean isInitial()- Specified by:
isInitial
in interfaceHttpRequest
-
getAsyncContext
- Specified by:
getAsyncContext
in interfaceHttpRequest
-
forward
- Specified by:
forward
in interfaceHttpRequest
-
wasForwarded
public boolean wasForwarded()- Specified by:
wasForwarded
in interfaceHttpRequest
-
getRemoteHost
Description copied from interface:HttpRequest
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.- Specified by:
getRemoteHost
in interfaceHttpRequest
- Returns:
- a
String
containing the fully qualified name of the client
-
getRemoteAddress
Description copied from interface:HttpRequest
Returns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Specified by:
getRemoteAddress
in interfaceHttpRequest
- Returns:
- a
String
containing the IP address of the client that sent the request
-