public static final class SimpleAsyncHttpClient.Builder extends Object implements SimpleAsyncHttpClient.DerivedBuilder
Constructor and Description |
---|
SimpleAsyncHttpClient.Builder() |
public SimpleAsyncHttpClient.Builder addBodyPart(Part part)
addBodyPart
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder addCookie(Cookie cookie)
addCookie
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder addHeader(String name, String value)
addHeader
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder addParameter(String key, String value)
addParameter
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder addQueryParameter(String name, String value)
addQueryParameter
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setHeader(String name, String value)
setHeader
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setHeaders(FluentCaseInsensitiveStringsMap headers)
setHeaders
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setHeaders(Map<String,Collection<String>> headers)
setHeaders
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setParameters(Map<String,Collection<String>> parameters)
setParameters
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setParameters(FluentStringsMap parameters)
setParameters
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setUrl(String url)
setUrl
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setVirtualHost(String virtualHost)
setVirtualHost
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setFollowRedirects(boolean followRedirects)
setFollowRedirects
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setMaximumConnectionsTotal(int defaultMaxTotalConnections)
public SimpleAsyncHttpClient.Builder setMaximumConnectionsPerHost(int defaultMaxConnectionPerHost)
public SimpleAsyncHttpClient.Builder setConnectionTimeoutInMs(int connectionTimeuot)
public SimpleAsyncHttpClient.Builder setIdleConnectionInPoolTimeoutInMs(int defaultIdleConnectionInPoolTimeoutInMs)
public SimpleAsyncHttpClient.Builder setRequestTimeoutInMs(int defaultRequestTimeoutInMs)
public SimpleAsyncHttpClient.Builder setMaximumNumberOfRedirects(int maxDefaultRedirects)
public SimpleAsyncHttpClient.Builder setCompressionEnabled(boolean compressionEnabled)
public SimpleAsyncHttpClient.Builder setUserAgent(String userAgent)
public SimpleAsyncHttpClient.Builder setAllowPoolingConnection(boolean allowPoolingConnection)
public SimpleAsyncHttpClient.Builder setExecutorService(ExecutorService applicationThreadPool)
public SimpleAsyncHttpClient.Builder setSSLEngineFactory(SSLEngineFactory sslEngineFactory)
public SimpleAsyncHttpClient.Builder setSSLContext(SSLContext sslContext)
public SimpleAsyncHttpClient.Builder setRequestCompressionLevel(int requestCompressionLevel)
public SimpleAsyncHttpClient.Builder setRealmDomain(String domain)
public SimpleAsyncHttpClient.Builder setRealmPrincipal(String principal)
public SimpleAsyncHttpClient.Builder setRealmPassword(String password)
public SimpleAsyncHttpClient.Builder setRealmScheme(Realm.AuthScheme scheme)
public SimpleAsyncHttpClient.Builder setRealmName(String realmName)
public SimpleAsyncHttpClient.Builder setRealmUsePreemptiveAuth(boolean usePreemptiveAuth)
public SimpleAsyncHttpClient.Builder setRealmEnconding(String enc)
public SimpleAsyncHttpClient.Builder setProxyProtocol(ProxyServer.Protocol protocol)
public SimpleAsyncHttpClient.Builder setProxyHost(String host)
public SimpleAsyncHttpClient.Builder setProxyPrincipal(String principal)
public SimpleAsyncHttpClient.Builder setProxyPassword(String password)
public SimpleAsyncHttpClient.Builder setProxyPort(int port)
public SimpleAsyncHttpClient.Builder setDefaultThrowableHandler(ThrowableHandler throwableHandler)
public SimpleAsyncHttpClient.Builder setErrorDocumentBehaviour(SimpleAsyncHttpClient.ErrorDocumentBehaviour behaviour)
BodyConsumer
after an error status code was received (e.g.
404). Default is SimpleAsyncHttpClient.ErrorDocumentBehaviour.WRITE
.public SimpleAsyncHttpClient.Builder setResumableDownload(boolean enableResumableDownload)
ResumableBodyConsumer
.setResumableDownload
in interface SimpleAsyncHttpClient.DerivedBuilder
public SimpleAsyncHttpClient.Builder setListener(SimpleAHCTransferListener listener)
public SimpleAsyncHttpClient.Builder setMaxRequestRetry(int maxRequestRetry)
IOException
occurs because of a Network exception.maxRequestRetry
- the number of time a request will be retriedpublic SimpleAsyncHttpClient.Builder setProviderClass(String providerClass)
public SimpleAsyncHttpClient build()
build
in interface SimpleAsyncHttpClient.DerivedBuilder
Copyright © 2014. All Rights Reserved.