public final class HttpClientOptions extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
OPTION_PROPERTY_PREFIX |
static String |
OPTION_THREAD_WORK_QUEUE_LIMIT |
| Constructor and Description |
|---|
HttpClientOptions() |
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
getCallbackExecutor() |
long |
getConnectionPoolTimeToLive() |
long |
getConnectionTimeout() |
Optional<HostResolver> |
getHostResolver() |
boolean |
getIgnoreCookies()
Whether or not to ignore cookies.
|
long |
getIoSelectInterval()
Determines time interval in milliseconds at which the I/O reactor wakes up to check for
timed out sessions and session requests.
|
int |
getIoThreadCount()
Determines the number of I/O dispatch threads to be used by the I/O reactor.
|
long |
getLeaseTimeout() |
int |
getMaxCacheEntries() |
long |
getMaxCacheObjectSize() |
int |
getMaxCallbackThreadPoolSize() |
int |
getMaxConnectionsPerHost() |
long |
getMaxEntitySize() |
int |
getMaxTotalConnections() |
ProxyOptions |
getProxyOptions() |
com.atlassian.util.concurrent.Effect<Request> |
getRequestPreparer() |
long |
getRequestTimeout() |
long |
getSocketTimeout() |
String |
getThreadPrefix() |
int |
getThreadWorkQueueLimit() |
String |
getUserAgent() |
void |
setCallbackExecutor(ExecutorService callbackExecutor) |
void |
setConnectionPoolTimeToLive(int connectionPoolTimeToLive,
TimeUnit timeUnit) |
void |
setConnectionTimeout(int connectionTimeout,
TimeUnit timeUnit)
Sets how long, in milliseconds, to wait for a TCP connection
|
void |
setHostResolver(HostResolver hostResolver) |
void |
setIgnoreCookies(boolean ignoreCookies) |
void |
setIoSelectInterval(int ioSelectInterval,
TimeUnit timeUnit)
Defines time interval in milliseconds at which the I/O reactor wakes up to check for
timed out sessions and session requests.
|
void |
setIoThreadCount(int ioThreadCount) |
void |
setLeaseTimeout(long leaseTimeout) |
void |
setMaxCacheEntries(int maxCacheEntries) |
void |
setMaxCacheObjectSize(long maxCacheObjectSize) |
void |
setMaxCallbackThreadPoolSize(int maxCallbackThreadPoolSize) |
void |
setMaxConnectionsPerHost(int maxConnectionsPerHost) |
void |
setMaxEntitySize(long maxEntitySize)
param maxEntitySize The maximum entity size in bytes
|
void |
setMaxTotalConnections(int maxTotalConnections) |
void |
setProxyOptions(ProxyOptions proxyOptions)
Set proxy options for the client
|
void |
setRequestPreparer(com.atlassian.util.concurrent.Effect<Request> requestPreparer) |
void |
setRequestTimeout(int requestTimeout,
TimeUnit timeUnit) |
void |
setSocketTimeout(int socketTimeout,
TimeUnit timeUnit) |
void |
setThreadPrefix(String threadPrefix) |
void |
setThreadWorkQueueLimit(int threadWorkQueueLimit) |
void |
setTrustSelfSignedCertificates(boolean trustSelfSignedCertificates) |
void |
setUserAgent(String userAgent) |
boolean |
trustSelfSignedCertificates() |
public static final String OPTION_PROPERTY_PREFIX
public static final String OPTION_THREAD_WORK_QUEUE_LIMIT
public boolean getIgnoreCookies()
falsepublic void setIgnoreCookies(boolean ignoreCookies)
ignoreCookies - Whether or not to ignore cookies.public int getIoThreadCount()
10public void setIoThreadCount(int ioThreadCount)
ioThreadCount - The number of I/O dispatch threads to be used by the I/O reactor.
May not be negative or zero.public long getIoSelectInterval()
1000 milliseconds.public void setIoSelectInterval(int ioSelectInterval,
TimeUnit timeUnit)
public long getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout,
TimeUnit timeUnit)
connectionTimeout - Timeout value, defaults to 5000 millisecondstimeUnit - The time unitpublic long getSocketTimeout()
public void setSocketTimeout(int socketTimeout,
TimeUnit timeUnit)
socketTimeout - How long to wait for data, defaults to 20 secondstimeUnit - The time unitpublic long getRequestTimeout()
public void setRequestTimeout(int requestTimeout,
TimeUnit timeUnit)
requestTimeout - How long to wait for the entire request. Defaults to 30 seconds.timeUnit - The time unitpublic String getUserAgent()
public void setUserAgent(String userAgent)
userAgent - The user agent stringpublic String getThreadPrefix()
public Optional<HostResolver> getHostResolver()
Optional.empty()public void setHostResolver(HostResolver hostResolver)
public void setThreadPrefix(String threadPrefix)
threadPrefix - Name prefix to use for spawned threadspublic long getConnectionPoolTimeToLive()
public void setConnectionPoolTimeToLive(int connectionPoolTimeToLive,
TimeUnit timeUnit)
connectionPoolTimeToLive - How long to allow connections to live in the pooltimeUnit - The time unitpublic int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections - How many simultaneous connections are allowed in totalpublic int getMaxConnectionsPerHost()
public void setMaxConnectionsPerHost(int maxConnectionsPerHost)
maxConnectionsPerHost - How many connections are allowed per hostpublic long getMaxCacheObjectSize()
public void setMaxCacheObjectSize(long maxCacheObjectSize)
maxCacheObjectSize - The max cache object size in bytespublic int getMaxCacheEntries()
public void setMaxCacheEntries(int maxCacheEntries)
maxCacheEntries - The max cache entriespublic com.atlassian.util.concurrent.Effect<Request> getRequestPreparer()
public void setRequestPreparer(com.atlassian.util.concurrent.Effect<Request> requestPreparer)
requestPreparer - The effect to apply before the request is executedpublic long getMaxEntitySize()
public long getLeaseTimeout()
public void setLeaseTimeout(long leaseTimeout)
leaseTimeout - The maximum time request to be kept in queue before execution, after timeout - request will be removedpublic void setMaxEntitySize(long maxEntitySize)
public int getMaxCallbackThreadPoolSize()
public void setMaxCallbackThreadPoolSize(int maxCallbackThreadPoolSize)
maxCallbackThreadPoolSize - The maximum number of threads that can be used for executing callbackspublic void setCallbackExecutor(ExecutorService callbackExecutor)
public ExecutorService getCallbackExecutor()
public void setTrustSelfSignedCertificates(boolean trustSelfSignedCertificates)
public boolean trustSelfSignedCertificates()
public void setProxyOptions(@Nonnull ProxyOptions proxyOptions)
proxyOptions - Proxy options created using ProxyOptions.ProxyOptionsBuilder.public ProxyOptions getProxyOptions()
public int getThreadWorkQueueLimit()
public void setThreadWorkQueueLimit(int threadWorkQueueLimit)
Copyright © 2012–2018 Atlassian. All rights reserved.