Class RequestWrapper

java.lang.Object
org.glassfish.jersey.client.oauth1.RequestWrapper
All Implemented Interfaces:
OAuth1Request

class RequestWrapper extends Object implements OAuth1Request
Implements the OAuth signature library Request interface, wrapping a Jersey client request object.
Since:
2.3
  • Field Details

    • clientRequest

      private final javax.ws.rs.client.ClientRequestContext clientRequest
      The wrapped Jersey client request.
    • messageBodyWorkers

      private final MessageBodyWorkers messageBodyWorkers
    • parameters

      private javax.ws.rs.core.MultivaluedMap<String,String> parameters
      Form and query parameters from the request (lazily initialized).
  • Constructor Details

    • RequestWrapper

      public RequestWrapper(javax.ws.rs.client.ClientRequestContext clientRequest, MessageBodyWorkers messageBodyWorkers)
      Constructs a new OAuth client request wrapper around the specified Jersey client request object.
      Parameters:
      clientRequest - Client request.
      messageBodyWorkers - Message body workers.
  • Method Details

    • setParameters

      private void setParameters()
    • getRequestMethod

      public String getRequestMethod()
      Description copied from interface: OAuth1Request
      Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
      Specified by:
      getRequestMethod in interface OAuth1Request
      Returns:
      the name of the method with which this request was made.
    • getRequestURL

      public URL getRequestURL()
      Description copied from interface: OAuth1Request
      Returns the URL of the request, including protocol, server name, optional port number, and server path.
      Specified by:
      getRequestURL in interface OAuth1Request
      Returns:
      the request URL.
    • getParameterNames

      public Set<String> getParameterNames()
      Description copied from interface: OAuth1Request
      Returns an Set of String objects containing the names of the parameters contained in the request.
      Specified by:
      getParameterNames in interface OAuth1Request
      Returns:
      the names of the parameters.
    • getParameterValues

      public List<String> getParameterValues(String name)
      Description copied from interface: OAuth1Request
      Returns an List of String objects containing the values of the specified request parameter, or null if the parameter does not exist. For HTTP requests, parameters are contained in the query string and/or posted form data.
      Specified by:
      getParameterValues in interface OAuth1Request
      Parameters:
      name - the name of the parameter.
      Returns:
      the values of the parameter.
    • getHeaderValues

      public List<String> getHeaderValues(String name)
      Description copied from interface: OAuth1Request
      Returns the value(s) of the specified request header. If the request did not include a header of the specified name, this method returns null.
      Specified by:
      getHeaderValues in interface OAuth1Request
      Parameters:
      name - the header name.
      Returns:
      the value(s) of the requested header, or null if none exist.
    • addHeaderValue

      public void addHeaderValue(String name, String value)
      Description copied from interface: OAuth1Request
      Adds a header with the given name and value.
      Specified by:
      addHeaderValue in interface OAuth1Request
      Parameters:
      name - the name of the header.
      value - the header value.