com.sun.jersey.oauth.signature
Interface OAuthRequest

All Known Implementing Classes:
OAuthServerRequest

public interface OAuthRequest

Interface to be implemented as a wrapper around an HTTP request, so that digital signature can be generated and/or verified.

Author:
Paul C. Bryan

Method Summary
 void addHeaderValue(java.lang.String name, java.lang.String value)
          Adds a header with the given name and value.
 java.util.List<java.lang.String> getHeaderValues(java.lang.String name)
          Returns the value(s) of the specified request header.
 java.util.Set<java.lang.String> getParameterNames()
          Returns an Set of String objects containing the names of the parameters contained in the request.
 java.util.List<java.lang.String> getParameterValues(java.lang.String name)
          Returns an List of String objects containing the values of the specified request parameter, or null if the parameter does not exist.
 java.lang.String getRequestMethod()
          Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
 java.lang.String getRequestURL()
          Returns the URL of the request, including protocol, server name, optional port number, and server path.
 

Method Detail

getRequestMethod

java.lang.String getRequestMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.

Returns:
the name of the method with which this request was made.

getRequestURL

java.lang.String getRequestURL()
Returns the URL of the request, including protocol, server name, optional port number, and server path.

Returns:
the request URL.

getParameterNames

java.util.Set<java.lang.String> getParameterNames()
Returns an Set of String objects containing the names of the parameters contained in the request.

Returns:
the names of the parameters.

getParameterValues

java.util.List<java.lang.String> getParameterValues(java.lang.String name)
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.

Parameters:
name - the name of the parameter.
Returns:
the values of the parameter.

getHeaderValues

java.util.List<java.lang.String> getHeaderValues(java.lang.String name)
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.

Parameters:
name - the header name.
Returns:
the value(s) of the requested header, or null if none exist.

addHeaderValue

void addHeaderValue(java.lang.String name,
                    java.lang.String value)
                    throws java.lang.IllegalStateException
Adds a header with the given name and value.

Parameters:
name - the name of the header.
value - the header value.
Throws:
java.lang.IllegalStateException - if this method cannot be implemented.


Copyright © 2011 Sun Microsystems, Inc. All Rights Reserved.