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
Abstraction for an inbound http request on the server, or a response from a server to a client
We 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
FieldsModifier and TypeFieldDescriptionprotected SynchronousDispatcherprotected SynchronousExecutionContextprotected ResteasyHttpHeadersprotected Stringprotected HttpResponseprotected InputStreamprotected jakarta.servlet.http.HttpServletRequestprotected jakarta.servlet.ServletContextprotected jakarta.servlet.http.HttpServletResponseprotected booleanFields inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest
decodedFormParameters, formParameters, uri -
Constructor Summary
ConstructorsConstructorDescriptionHttpServletInputMessage(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse servletResponse, jakarta.servlet.ServletContext servletContext, HttpResponse httpResponse, ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, String httpMethod, SynchronousDispatcher dispatcher) -
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.protected booleanmapEquals(Map<String, String[]> parameterMap, jakarta.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().booleanMethods inherited from class org.jboss.resteasy.plugins.server.BaseHttpRequest
getUri, isInitial, setRequestUri, setRequestUri
-
Field Details
-
httpHeaders
-
request
protected jakarta.servlet.http.HttpServletRequest request -
servletResponse
protected jakarta.servlet.http.HttpServletResponse servletResponse -
servletContext
protected jakarta.servlet.ServletContext servletContext -
dispatcher
-
httpResponse
-
httpMethod
-
overridenStream
-
executionContext
-
wasForwarded
protected boolean wasForwarded
-
-
Constructor Details
-
HttpServletInputMessage
public HttpServletInputMessage(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse servletResponse, jakarta.servlet.ServletContext servletContext, HttpResponse httpResponse, ResteasyHttpHeaders httpHeaders, ResteasyUriInfo uri, String httpMethod, SynchronousDispatcher dispatcher)
-
-
Method Details
-
getMutableHeaders
-
getPutFormParameters
-
getPutDecodedFormParameters
-
getAttribute
Description copied from interface:HttpRequestMap of contextual data. Similar to HttpServletRequest attributes- Parameters:
attribute- attribute name- Returns:
- attribute
-
setAttribute
-
removeAttribute
-
getAttributeNames
-
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
-
getFormEntityPart
Description copied from interface:HttpRequestReturns the optional entity part for amultipart/form-datarequest.- Parameters:
name- the name of the entity part- Returns:
- an optional entity part for the name
-
getFormEntityParts
Description copied from interface:HttpRequestReturns for entity parts for amultipart/form-datarequest.- Returns:
- the entity parts or an empty list
-
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 jakarta.ws.rs.core.HttpHeaders getHttpHeaders() -
getInputStream
-
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- Parameters:
stream- input stream
-
getHttpMethod
-
setHttpMethod
-
getAsyncContext
-
forward
-
wasForwarded
public boolean wasForwarded() -
mapEquals
-
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
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
-