org.jclouds.http.options
Class BaseHttpRequestOptions

java.lang.Object
  extended by org.jclouds.http.options.BaseHttpRequestOptions
All Implemented Interfaces:
HttpRequestOptions
Direct Known Subclasses:
AddLoadBalancerOptions, AddServerOptions, BaseEC2RequestOptions, BaseListOptions, CopyObjectOptions, CreateInstanceOptions, CreateOptions, GetImageListOptions, GetIpListOptions, GetJobListOptions, GetOptions, GetServerListOptions, ListBucketOptions, ListCdnContainerOptions, ListContainerOptions, ListOptions, ListOptions, ListOptions, PutBucketOptions, PutObjectOptions, PutOptions

public class BaseHttpRequestOptions
extends Object
implements HttpRequestOptions

Author:
Adrian Cole
See Also:
HttpRequestOptions

Field Summary
protected  com.google.common.collect.Multimap<String,String> formParameters
           
protected  com.google.common.collect.Multimap<String,String> headers
           
protected  com.google.common.collect.Multimap<String,String> matrixParameters
           
protected  String pathSuffix
           
protected  String payload
           
protected  com.google.common.collect.Multimap<String,String> queryParameters
           
 
Constructor Summary
BaseHttpRequestOptions()
           
 
Method Summary
 com.google.common.collect.Multimap<String,String> buildFormParameters()
          Builds form parameters representing options.
 com.google.common.collect.Multimap<String,String> buildMatrixParameters()
          Builds matrix parameters representing options.
 String buildPathSuffix()
           
 com.google.common.collect.Multimap<String,String> buildQueryParameters()
          Builds query parameters representing options.
 com.google.common.collect.Multimap<String,String> buildRequestHeaders()
          Builds headers representing options.
 String buildStringPayload()
           
 boolean equals(Object obj)
           
protected  String getFirstFormOrNull(String string)
           
protected  String getFirstHeaderOrNull(String string)
           
protected  String getFirstMatrixOrNull(String string)
           
protected  String getFirstQueryOrNull(String string)
           
 int hashCode()
           
protected  void replaceHeader(String key, String value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

matrixParameters

protected final com.google.common.collect.Multimap<String,String> matrixParameters

formParameters

protected final com.google.common.collect.Multimap<String,String> formParameters

queryParameters

protected final com.google.common.collect.Multimap<String,String> queryParameters

headers

protected final com.google.common.collect.Multimap<String,String> headers

payload

protected String payload

pathSuffix

protected String pathSuffix
Constructor Detail

BaseHttpRequestOptions

public BaseHttpRequestOptions()
Method Detail

buildStringPayload

public String buildStringPayload()
Specified by:
buildStringPayload in interface HttpRequestOptions

getFirstMatrixOrNull

protected String getFirstMatrixOrNull(String string)

getFirstQueryOrNull

protected String getFirstQueryOrNull(String string)

getFirstFormOrNull

protected String getFirstFormOrNull(String string)

getFirstHeaderOrNull

protected String getFirstHeaderOrNull(String string)

replaceHeader

protected void replaceHeader(String key,
                             String value)

buildRequestHeaders

public com.google.common.collect.Multimap<String,String> buildRequestHeaders()
Builds headers representing options.

Specified by:
buildRequestHeaders in interface HttpRequestOptions
Returns:
multimap that may contain headers.

buildQueryParameters

public com.google.common.collect.Multimap<String,String> buildQueryParameters()
Builds query parameters representing options.

Specified by:
buildQueryParameters in interface HttpRequestOptions
Returns:
map that may contain query parameters.

buildMatrixParameters

public com.google.common.collect.Multimap<String,String> buildMatrixParameters()
Builds matrix parameters representing options.

Specified by:
buildMatrixParameters in interface HttpRequestOptions
Returns:
multimap that may contain matrix parameters.

buildPathSuffix

public String buildPathSuffix()
Specified by:
buildPathSuffix in interface HttpRequestOptions

buildFormParameters

public com.google.common.collect.Multimap<String,String> buildFormParameters()
Description copied from interface: HttpRequestOptions
Builds form parameters representing options.

Specified by:
buildFormParameters in interface HttpRequestOptions
Returns:
map that may contain query parameters.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.