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

public class HttpServletInputMessage extends BaseHttpRequest
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 Details

    • httpHeaders

      protected ResteasyHttpHeaders httpHeaders
    • request

      protected jakarta.servlet.http.HttpServletRequest request
    • servletResponse

      protected jakarta.servlet.http.HttpServletResponse servletResponse
    • servletContext

      protected jakarta.servlet.ServletContext servletContext
    • dispatcher

      protected SynchronousDispatcher dispatcher
    • httpResponse

      protected HttpResponse httpResponse
    • httpMethod

      protected String httpMethod
    • overridenStream

      protected InputStream overridenStream
    • executionContext

      protected SynchronousExecutionContext executionContext
    • wasForwarded

      protected boolean wasForwarded
  • Constructor Details

  • Method Details

    • getMutableHeaders

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getMutableHeaders()
    • getPutFormParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getPutFormParameters()
    • getPutDecodedFormParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getPutDecodedFormParameters()
    • getAttribute

      public Object getAttribute(String attribute)
      Description copied from interface: HttpRequest
      Map of contextual data. Similar to HttpServletRequest attributes
      Parameters:
      attribute - attribute name
      Returns:
      attribute
    • setAttribute

      public void setAttribute(String name, Object value)
    • removeAttribute

      public void removeAttribute(String name)
    • getAttributeNames

      public Enumeration<String> getAttributeNames()
    • getFormParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getFormParameters()
      Description copied from interface: HttpRequest
      application/x-www-form-urlencoded parameters

      This is here because @FormParam needs it and for when there are servlet filters that eat up the input stream

      Specified by:
      getFormParameters in interface HttpRequest
      Overrides:
      getFormParameters in class BaseHttpRequest
      Returns:
      null if no parameters, this is encoded map
    • getFormEntityPart

      public Optional<jakarta.ws.rs.core.EntityPart> getFormEntityPart(String name)
      Description copied from interface: HttpRequest
      Returns the optional entity part for a multipart/form-data request.
      Parameters:
      name - the name of the entity part
      Returns:
      an optional entity part for the name
    • getFormEntityParts

      public List<jakarta.ws.rs.core.EntityPart> getFormEntityParts()
      Description copied from interface: HttpRequest
      Returns for entity parts for a multipart/form-data request.
      Returns:
      the entity parts or an empty list
    • getDecodedFormParameters

      public jakarta.ws.rs.core.MultivaluedMap<String,String> getDecodedFormParameters()
      Specified by:
      getDecodedFormParameters in interface HttpRequest
      Overrides:
      getDecodedFormParameters in class BaseHttpRequest
    • formParametersRead

      public boolean formParametersRead()
      Description copied from interface: HttpRequest
      Were form parameters read before marshalling to body?
      Specified by:
      formParametersRead in interface HttpRequest
      Overrides:
      formParametersRead in class BaseHttpRequest
      Returns:
    • getHttpHeaders

      public jakarta.ws.rs.core.HttpHeaders getHttpHeaders()
    • getInputStream

      public InputStream getInputStream()
    • setInputStream

      public void setInputStream(InputStream stream)
      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
      Parameters:
      stream - input stream
    • getHttpMethod

      public String getHttpMethod()
    • setHttpMethod

      public void setHttpMethod(String method)
    • getAsyncContext

      public ResteasyAsynchronousContext getAsyncContext()
    • forward

      public void forward(String path)
    • wasForwarded

      public boolean wasForwarded()
    • mapEquals

      protected boolean mapEquals(Map<String,String[]> parameterMap, jakarta.ws.rs.core.MultivaluedMap<String,String> queryMap)
    • getRemoteHost

      public String 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.
      Returns:
      a String containing the fully qualified name of the client
    • getRemoteAddress

      public String getRemoteAddress()
      Description copied from interface: HttpRequest
      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