Class RequestWrapper
java.lang.Object
org.glassfish.jersey.client.oauth1.RequestWrapper
- All Implemented Interfaces:
OAuth1Request
Implements the OAuth signature library Request interface, wrapping a Jersey
client request object.
- Since:
- 2.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javax.ws.rs.client.ClientRequestContext
The wrapped Jersey client request.private final MessageBodyWorkers
Form and query parameters from the request (lazily initialized). -
Constructor Summary
ConstructorsConstructorDescriptionRequestWrapper
(javax.ws.rs.client.ClientRequestContext clientRequest, MessageBodyWorkers messageBodyWorkers) Constructs a new OAuth client request wrapper around the specified Jersey client request object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHeaderValue
(String name, String value) Adds a header with the given name and value.getHeaderValues
(String name) Returns the value(s) of the specified request header.getParameterValues
(String name) Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.Returns the URL of the request, including protocol, server name, optional port number, and server path.private void
-
Field Details
-
clientRequest
private final javax.ws.rs.client.ClientRequestContext clientRequestThe wrapped Jersey client request. -
messageBodyWorkers
-
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
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 interfaceOAuth1Request
- Returns:
- the name of the method with which this request was made.
-
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 interfaceOAuth1Request
- Returns:
- the request URL.
-
getParameterNames
Description copied from interface:OAuth1Request
- Specified by:
getParameterNames
in interfaceOAuth1Request
- Returns:
- the names of the parameters.
-
getParameterValues
Description copied from interface:OAuth1Request
Returns anList
ofString
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 interfaceOAuth1Request
- Parameters:
name
- the name of the parameter.- Returns:
- the values of the parameter.
-
getHeaderValues
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 interfaceOAuth1Request
- Parameters:
name
- the header name.- Returns:
- the value(s) of the requested header, or null if none exist.
-
addHeaderValue
Description copied from interface:OAuth1Request
Adds a header with the given name and value.- Specified by:
addHeaderValue
in interfaceOAuth1Request
- Parameters:
name
- the name of the header.value
- the header value.
-