public final class HttpClientOptions
extends java.lang.Object
| Constructor and Description |
|---|
HttpClientOptions() |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.ExecutorService |
getCallbackExecutor() |
long |
getConnectionPoolTimeToLive() |
long |
getConnectionTimeout() |
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 |
getMaxConnectionsPerHost() |
long |
getMaxEntitySize() |
com.atlassian.util.concurrent.Effect<Request> |
getRequestPreparer() |
long |
getRequestTimeout() |
long |
getSocketTimeout() |
java.lang.String |
getThreadPrefix() |
java.lang.String |
getUserAgent() |
void |
setCallbackExecutor(java.util.concurrent.ExecutorService callbackExecutor) |
void |
setConnectionPoolTimeToLive(int connectionPoolTimeToLive,
java.util.concurrent.TimeUnit timeUnit) |
void |
setConnectionTimeout(int connectionTimeout,
java.util.concurrent.TimeUnit timeUnit)
Sets how long, in milliseconds, to wait for a TCP connection
|
void |
setIoSelectInterval(int ioSelectInterval,
java.util.concurrent.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 |
setMaxConnectionsPerHost(int maxConnectionsPerHost) |
void |
setMaxEntitySize(long maxEntitySize)
param maxEntitySize The maximum entity size in bytes
|
void |
setRequestPreparer(com.atlassian.util.concurrent.Effect<Request> requestPreparer) |
void |
setRequestTimeout(int requestTimeout,
java.util.concurrent.TimeUnit timeUnit) |
void |
setSocketTimeout(int socketTimeout,
java.util.concurrent.TimeUnit timeUnit) |
void |
setThreadPrefix(java.lang.String threadPrefix) |
void |
setUserAgent(java.lang.String userAgent) |
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,
java.util.concurrent.TimeUnit timeUnit)
public long getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout,
java.util.concurrent.TimeUnit timeUnit)
connectionTimeout - Timeout value, defaults to 5000 millisecondstimeUnit - The time unitpublic long getSocketTimeout()
public void setSocketTimeout(int socketTimeout,
java.util.concurrent.TimeUnit timeUnit)
socketTimeout - How long to wait for data, defaults to 20 secondstimeUnit - The time unitpublic long getRequestTimeout()
public void setRequestTimeout(int requestTimeout,
java.util.concurrent.TimeUnit timeUnit)
requestTimeout - How long to wait for the entire request. Defaults to 30 seconds.timeUnit - The time unitpublic java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
userAgent - The user agent stringpublic java.lang.String getThreadPrefix()
public void setThreadPrefix(java.lang.String threadPrefix)
threadPrefix - Name prefix to use for spawned threadspublic long getConnectionPoolTimeToLive()
public void setConnectionPoolTimeToLive(int connectionPoolTimeToLive,
java.util.concurrent.TimeUnit timeUnit)
connectionPoolTimeToLive - How long to allow connections to live in the pooltimeUnit - The time unitpublic 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 void setCallbackExecutor(java.util.concurrent.ExecutorService callbackExecutor)
public java.util.concurrent.ExecutorService getCallbackExecutor()
Copyright © 2012-2013 Atlassian. All Rights Reserved.