com.ning.http.client
Class AsyncHttpClient.BoundRequestBuilder

java.lang.Object
  extended by com.ning.http.client.RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
      extended by com.ning.http.client.AsyncHttpClient.BoundRequestBuilder
Enclosing class:
AsyncHttpClient

public class AsyncHttpClient.BoundRequestBuilder
extends RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>


Field Summary
protected  String baseURL
          URL used as the base, not including possibly query parameters.
protected  SignatureCalculator signatureCalculator
          Calculator used for calculating request signature for the request being built, if any.
 
Fields inherited from class com.ning.http.client.RequestBuilderBase
request, useRawUrl
 
Method Summary
 AsyncHttpClient.BoundRequestBuilder addBodyPart(Part part)
           
 AsyncHttpClient.BoundRequestBuilder addCookie(Cookie cookie)
           
 AsyncHttpClient.BoundRequestBuilder addHeader(String name, String value)
           
 AsyncHttpClient.BoundRequestBuilder addParameter(String key, String value)
           
 AsyncHttpClient.BoundRequestBuilder addQueryParameter(String name, String value)
           
 Request build()
           
 ListenableFuture<Response> execute()
           
<T> ListenableFuture<T>
execute(AsyncHandler<T> handler)
           
 AsyncHttpClient.BoundRequestBuilder setBody(byte[] data)
           
 AsyncHttpClient.BoundRequestBuilder setBody(InputStream stream)
           
 AsyncHttpClient.BoundRequestBuilder setBody(Request.EntityWriter dataWriter)
           
 AsyncHttpClient.BoundRequestBuilder setBody(Request.EntityWriter dataWriter, long length)
           
 AsyncHttpClient.BoundRequestBuilder setBody(String data)
           
 AsyncHttpClient.BoundRequestBuilder setHeader(String name, String value)
           
 AsyncHttpClient.BoundRequestBuilder setHeaders(FluentCaseInsensitiveStringsMap headers)
           
 AsyncHttpClient.BoundRequestBuilder setHeaders(Map<String,Collection<String>> headers)
           
 AsyncHttpClient.BoundRequestBuilder setParameters(FluentStringsMap parameters)
           
 AsyncHttpClient.BoundRequestBuilder setParameters(Map<String,Collection<String>> parameters)
           
 AsyncHttpClient.BoundRequestBuilder setSignatureCalculator(SignatureCalculator signatureCalculator)
           
 AsyncHttpClient.BoundRequestBuilder setUrl(String url)
           
 AsyncHttpClient.BoundRequestBuilder setVirtualHost(String virtualHost)
           
 
Methods inherited from class com.ning.http.client.RequestBuilderBase
addOrReplaceCookie, setBody, setBody, setBodyEncoding, setContentLength, setFollowRedirects, setMethod, setPerRequestConfig, setProxyServer, setQueryParameters, setRangeOffset, setRealm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

signatureCalculator

protected SignatureCalculator signatureCalculator
Calculator used for calculating request signature for the request being built, if any.


baseURL

protected String baseURL
URL used as the base, not including possibly query parameters. Needed for signature calculation

Method Detail

execute

public <T> ListenableFuture<T> execute(AsyncHandler<T> handler)
                            throws IOException
Throws:
IOException

execute

public ListenableFuture<Response> execute()
                                   throws IOException
Throws:
IOException

addBodyPart

public AsyncHttpClient.BoundRequestBuilder addBodyPart(Part part)
                                                throws IllegalArgumentException
Overrides:
addBodyPart in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

addCookie

public AsyncHttpClient.BoundRequestBuilder addCookie(Cookie cookie)
Overrides:
addCookie in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

addHeader

public AsyncHttpClient.BoundRequestBuilder addHeader(String name,
                                                     String value)
Overrides:
addHeader in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

addParameter

public AsyncHttpClient.BoundRequestBuilder addParameter(String key,
                                                        String value)
                                                 throws IllegalArgumentException
Overrides:
addParameter in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

addQueryParameter

public AsyncHttpClient.BoundRequestBuilder addQueryParameter(String name,
                                                             String value)
Overrides:
addQueryParameter in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

build

public Request build()
Overrides:
build in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setBody

public AsyncHttpClient.BoundRequestBuilder setBody(byte[] data)
                                            throws IllegalArgumentException
Overrides:
setBody in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setBody

public AsyncHttpClient.BoundRequestBuilder setBody(Request.EntityWriter dataWriter,
                                                   long length)
                                            throws IllegalArgumentException
Overrides:
setBody in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setBody

public AsyncHttpClient.BoundRequestBuilder setBody(Request.EntityWriter dataWriter)
Overrides:
setBody in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setBody

public AsyncHttpClient.BoundRequestBuilder setBody(InputStream stream)
                                            throws IllegalArgumentException
Overrides:
setBody in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setBody

public AsyncHttpClient.BoundRequestBuilder setBody(String data)
                                            throws IllegalArgumentException
Overrides:
setBody in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setHeader

public AsyncHttpClient.BoundRequestBuilder setHeader(String name,
                                                     String value)
Overrides:
setHeader in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setHeaders

public AsyncHttpClient.BoundRequestBuilder setHeaders(FluentCaseInsensitiveStringsMap headers)
Overrides:
setHeaders in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setHeaders

public AsyncHttpClient.BoundRequestBuilder setHeaders(Map<String,Collection<String>> headers)
Overrides:
setHeaders in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setParameters

public AsyncHttpClient.BoundRequestBuilder setParameters(Map<String,Collection<String>> parameters)
                                                  throws IllegalArgumentException
Overrides:
setParameters in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setParameters

public AsyncHttpClient.BoundRequestBuilder setParameters(FluentStringsMap parameters)
                                                  throws IllegalArgumentException
Overrides:
setParameters in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
Throws:
IllegalArgumentException

setUrl

public AsyncHttpClient.BoundRequestBuilder setUrl(String url)
Overrides:
setUrl in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setVirtualHost

public AsyncHttpClient.BoundRequestBuilder setVirtualHost(String virtualHost)
Overrides:
setVirtualHost in class RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>

setSignatureCalculator

public AsyncHttpClient.BoundRequestBuilder setSignatureCalculator(SignatureCalculator signatureCalculator)


Copyright © 2011. All Rights Reserved.