Class JettyRequestWrapper

java.lang.Object
is.galia.resource.JettyRequestWrapper
All Implemented Interfaces:
Request

public final class JettyRequestWrapper extends Object implements Request
Implementation backed by a Request.
  • Constructor Details

    • JettyRequestWrapper

      public JettyRequestWrapper(org.eclipse.jetty.server.Request jettyRequest)
  • Method Details

    • getCookies

      public Cookies getCookies()
      Specified by:
      getCookies in interface Request
      Returns:
      New instance. Any changes to it will not be reflected in the wrapped Request.
    • getHeaders

      public Headers getHeaders()
      Specified by:
      getHeaders in interface Request
      Returns:
      New instance. Any changes to it will not be reflected in the wrapped Request.
    • getMethod

      public Method getMethod()
      Specified by:
      getMethod in interface Request
    • getPathArguments

      public List<String> getPathArguments()
      Specified by:
      getPathArguments in interface Request
      Returns:
      Arguments in the URL path corresponding to the regex groups in one of the resource's route patterns.
    • getReference

      public Reference getReference()
      Specified by:
      getReference in interface Request
      Returns:
      Full request URI including query. Note that this may not be the URI that the user agent supplies or sees. Any changes to the instance will not be reflected in the wrapped Request.
      See Also:
    • getRemoteAddr

      public String getRemoteAddr()
      Specified by:
      getRemoteAddr in interface Request
      Returns:
      Client IP address. Note that this may not be the user agent IP address, as in the case of e.g. running behind a reverse proxy server.
      See Also:
    • openBodyStream

      public InputStream openBodyStream() throws IOException
      Specified by:
      openBodyStream in interface Request
      Returns:
      Stream for reading the request entity. May be null.
      Throws:
      IOException
    • setPathArguments

      public void setPathArguments(List<String> pathArguments)
      Description copied from interface: Request
      For testing purposes only.
      Specified by:
      setPathArguments in interface Request