com.ning.http.client
Class AsyncHttpClient.BoundRequestBuilder
java.lang.Object
com.ning.http.client.RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
com.ning.http.client.AsyncHttpClient.BoundRequestBuilder
- Enclosing class:
- AsyncHttpClient
public class AsyncHttpClient.BoundRequestBuilder
- extends RequestBuilderBase<AsyncHttpClient.BoundRequestBuilder>
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 |
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
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.