Package org.jboss.resteasy.util
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanWere form parameters read before marshalling to body?voidgetAttribute(String attribute) Map of contextual data.Optional<jakarta.ws.rs.core.EntityPart> getFormEntityPart(String name) Returns the optional entity part for amultipart/form-datarequest.List<jakarta.ws.rs.core.EntityPart> Returns for entity parts for amultipart/form-datarequest.application/x-www-form-urlencoded parametersjakarta.ws.rs.core.HttpHeadersReturns 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.UriInfogetUri()This method *MUST* always return the same instance.booleanvoidremoveAttribute(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 byHttpRequest.getUri().voidsetRequestUri(URI baseUri, URI requestUri) Updates the object returned byHttpRequest.getUri().boolean
-
Constructor Details
-
DelegatingHttpRequest
-
-
Method Details
-
getMutableHeaders
- Specified by:
getMutableHeadersin interfaceHttpRequest
-
setHttpMethod
- Specified by:
setHttpMethodin interfaceHttpRequest
-
getUri
public jakarta.ws.rs.core.UriInfo getUri()Description copied from interface:HttpRequestThis method *MUST* always return the same instance.- Specified by:
getUriin interfaceHttpRequest- Returns:
- uri info
-
setRequestUri
Description copied from interface:HttpRequestUpdates the object returned byHttpRequest.getUri().- Specified by:
setRequestUriin interfaceHttpRequest- Parameters:
requestUri- request uri- Throws:
IllegalStateException
-
setRequestUri
Description copied from interface:HttpRequestUpdates the object returned byHttpRequest.getUri().- Specified by:
setRequestUriin interfaceHttpRequest- Parameters:
baseUri- base urirequestUri- request uri- Throws:
IllegalStateException
-
getHttpHeaders
public jakarta.ws.rs.core.HttpHeaders getHttpHeaders()- Specified by:
getHttpHeadersin interfaceHttpRequest
-
getInputStream
- Specified by:
getInputStreamin interfaceHttpRequest
-
setInputStream
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- Specified by:
setInputStreamin interfaceHttpRequest- Parameters:
stream- input stream
-
getHttpMethod
- Specified by:
getHttpMethodin interfaceHttpRequest
-
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- Returns:
- null if no parameters, this is encoded map
-
getDecodedFormParameters
- Specified by:
getDecodedFormParametersin interfaceHttpRequest
-
getFormEntityParts
Description copied from interface:HttpRequestReturns for entity parts for amultipart/form-datarequest.- Specified by:
getFormEntityPartsin interfaceHttpRequest- Returns:
- the entity parts or an empty list
-
getFormEntityPart
Description copied from interface:HttpRequestReturns the optional entity part for amultipart/form-datarequest.- Specified by:
getFormEntityPartin 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:HttpRequestWere form parameters read before marshalling to body?- Specified by:
formParametersReadin interfaceHttpRequest- Returns:
-
getAttribute
Description copied from interface:HttpRequestMap of contextual data. Similar to HttpServletRequest attributes- Specified by:
getAttributein interfaceHttpRequest- Parameters:
attribute- attribute name- Returns:
- attribute
-
setAttribute
- Specified by:
setAttributein interfaceHttpRequest
-
removeAttribute
- Specified by:
removeAttributein interfaceHttpRequest
-
getAttributeNames
- Specified by:
getAttributeNamesin interfaceHttpRequest
-
isInitial
public boolean isInitial()- Specified by:
isInitialin interfaceHttpRequest
-
getAsyncContext
- Specified by:
getAsyncContextin interfaceHttpRequest
-
forward
- Specified by:
forwardin interfaceHttpRequest
-
wasForwarded
public boolean wasForwarded()- Specified by:
wasForwardedin interfaceHttpRequest
-
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.- Specified by:
getRemoteHostin interfaceHttpRequest- Returns:
- a
Stringcontaining the fully qualified name of the client
-
getRemoteAddress
Description copied from interface:HttpRequestReturns the Internet Protocol (IP) address of the client or last proxy that sent the request.- Specified by:
getRemoteAddressin interfaceHttpRequest- Returns:
- a
Stringcontaining the IP address of the client that sent the request
-