org.jclouds.http
Class HttpRequest

java.lang.Object
  extended by org.jclouds.http.internal.PayloadEnclosingImpl
      extended by org.jclouds.http.HttpMessage
          extended by org.jclouds.http.HttpRequest
All Implemented Interfaces:
PayloadEnclosing
Direct Known Subclasses:
GeneratedHttpRequest

public class HttpRequest
extends HttpMessage

Represents a request that can be executed within HttpCommandExecutorService

Author:
Adrian Cole

Nested Class Summary
static class HttpRequest.Builder<T extends HttpRequest>
           
 
Field Summary
 
Fields inherited from class org.jclouds.http.HttpMessage
headers
 
Fields inherited from class org.jclouds.http.internal.PayloadEnclosingImpl
payload
 
Constructor Summary
  HttpRequest(String method, URI endpoint)
           
  HttpRequest(String method, URI endpoint, char[] skips)
           
  HttpRequest(String method, URI endpoint, char[] skips, List<HttpRequestFilter> requestFilters)
           
  HttpRequest(String method, URI endpoint, char[] skips, List<HttpRequestFilter> requestFilters, Payload payload)
           
  HttpRequest(String method, URI endpoint, char[] skips, List<HttpRequestFilter> requestFilters, Payload payload, com.google.common.collect.Multimap<String,String> headers)
           
  HttpRequest(String method, URI endpoint, com.google.common.collect.Multimap<String,String> headers)
           
protected HttpRequest(String method, URI endpoint, com.google.common.collect.Multimap<String,String> headers, Payload payload)
           
 
Method Summary
 void addFilter(HttpRequestFilter filter)
           
static HttpRequest.Builder<? extends HttpRequest> builder()
           
 boolean equals(Object obj)
           
 URI getEndpoint()
           
 List<HttpRequestFilter> getFilters()
           
 String getMethod()
          We cannot return an enum, as per specification custom methods are allowed.
 String getRequestLine()
           
 char[] getSkips()
          characters to skip encoding on.
 int hashCode()
           
 HttpRequest.Builder<? extends HttpRequest> toBuilder()
           
 String toString()
           
 
Methods inherited from class org.jclouds.http.HttpMessage
getFirstHeaderOrNull, getHeaders
 
Methods inherited from class org.jclouds.http.internal.PayloadEnclosingImpl
getPayload, setPayload, setPayload, setPayload, setPayload, setPayload
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpRequest

public HttpRequest(String method,
                   URI endpoint)
Parameters:
endpoint - This may change over the life of the request due to redirects.
method - If the request is HEAD, this may change to GET due to redirects

HttpRequest

public HttpRequest(String method,
                   URI endpoint,
                   char[] skips)

HttpRequest

public HttpRequest(String method,
                   URI endpoint,
                   char[] skips,
                   List<HttpRequestFilter> requestFilters)

HttpRequest

public HttpRequest(String method,
                   URI endpoint,
                   char[] skips,
                   List<HttpRequestFilter> requestFilters,
                   @Nullable
                   Payload payload)

HttpRequest

public HttpRequest(String method,
                   URI endpoint,
                   com.google.common.collect.Multimap<String,String> headers)
Parameters:
endpoint - This may change over the life of the request due to redirects.
method - If the request is HEAD, this may change to GET due to redirects

HttpRequest

public HttpRequest(String method,
                   URI endpoint,
                   char[] skips,
                   List<HttpRequestFilter> requestFilters,
                   @Nullable
                   Payload payload,
                   com.google.common.collect.Multimap<String,String> headers)

HttpRequest

protected HttpRequest(String method,
                      URI endpoint,
                      com.google.common.collect.Multimap<String,String> headers,
                      @Nullable
                      Payload payload)
Parameters:
endpoint - This may change over the life of the request due to redirects.
method - If the request is HEAD, this may change to GET due to redirects
Method Detail

builder

public static HttpRequest.Builder<? extends HttpRequest> builder()

getRequestLine

public String getRequestLine()

getMethod

public String getMethod()
We cannot return an enum, as per specification custom methods are allowed. Enums are not extensible.

See Also:
rfc2616

getSkips

public char[] getSkips()
characters to skip encoding on.


getEndpoint

public URI getEndpoint()

addFilter

public void addFilter(HttpRequestFilter filter)

getFilters

public List<HttpRequestFilter> getFilters()

toBuilder

public HttpRequest.Builder<? extends HttpRequest> toBuilder()
Overrides:
toBuilder in class HttpMessage

hashCode

public int hashCode()
Overrides:
hashCode in class HttpMessage

equals

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

toString

public String toString()
Overrides:
toString in class HttpMessage


Copyright © 2009-2011 jclouds. All Rights Reserved.