org.soyatec.windowsazure.authenticate
Class HttpRequestAccessor

java.lang.Object
  extended by org.soyatec.windowsazure.authenticate.HttpRequestAccessor

public class HttpRequestAccessor
extends java.lang.Object

Use this class to extract various header values from HTTP requests.


Constructor Summary
HttpRequestAccessor()
           
 
Method Summary
static java.net.URI constructResourceUri(java.net.URI endPoint, org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents, boolean pathStyleUri)
          Constructs an URI given all its constituents
static java.util.List<java.lang.String> getHeaderValues(org.soyatec.windowsazure.internal.util.NameValueCollection header, java.lang.String headerName)
          A helper function for extracting HTTP header values from a NameValueCollection object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRequestAccessor

public HttpRequestAccessor()
Method Detail

getHeaderValues

public static java.util.List<java.lang.String> getHeaderValues(org.soyatec.windowsazure.internal.util.NameValueCollection header,
                                                               java.lang.String headerName)
A helper function for extracting HTTP header values from a NameValueCollection object.

Parameters:
header - A MultiValueMap object that should contain HTTP header name-values pairs.
headerName - Name of the header that we want to get values of.
Returns:
A array list of values for the header. The values are in the same order as they are exist in the MultiValueMap object.

constructResourceUri

public static java.net.URI constructResourceUri(java.net.URI endPoint,
                                                org.soyatec.windowsazure.internal.ResourceUriComponents uriComponents,
                                                boolean pathStyleUri)
Constructs an URI given all its constituents

Parameters:
endPoint - This is the service endpoint in case of path-style URIs and a host suffix in case of host-style URIs IMPORTANT: This does NOT include the service name or account name
uriComponents - Uri constituents
pathStyleUri - Indicates whether to construct a path-style Uri (true) or host-style URI (false)
Returns:
Full URI