|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.httpclient.params.DefaultHttpParams
com.microsoft.tfs.core.httpclient.params.HttpConnectionParams
com.microsoft.tfs.core.httpclient.params.HttpConnectionManagerParams
public class HttpConnectionManagerParams
This class represents a collection of HTTP protocol parameters applicable to
HTTP connection
managers
. Protocol parameters may be linked together to form a hierarchy. If
a particular parameter value has not been explicitly defined in the
collection itself, its value will be drawn from the parent collection of
parameters.
Field Summary | |
---|---|
static java.lang.String |
MAX_HOST_CONNECTIONS
Defines the maximum number of connections allowed per host configuration. |
static java.lang.String |
MAX_TOTAL_CONNECTIONS
Defines the maximum number of connections allowed overall. |
Fields inherited from class com.microsoft.tfs.core.httpclient.params.HttpConnectionParams |
---|
CONNECTION_TIMEOUT, SO_LINGER, SO_RCVBUF, SO_SNDBUF, SO_TIMEOUT, STALE_CONNECTION_CHECK, TCP_NODELAY |
Constructor Summary | |
---|---|
HttpConnectionManagerParams()
|
Method Summary | |
---|---|
int |
getDefaultMaxConnectionsPerHost()
Gets the default maximum number of connections allowed for a given host config. |
int |
getMaxConnectionsPerHost(HostConfiguration hostConfiguration)
Gets the maximum number of connections to be used for a particular host config. |
int |
getMaxTotalConnections()
Gets the maximum number of connections allowed. |
void |
setDefaultMaxConnectionsPerHost(int maxHostConnections)
Sets the default maximum number of connections allowed for a given host config. |
void |
setMaxConnectionsPerHost(HostConfiguration hostConfiguration,
int maxHostConnections)
Sets the maximum number of connections to be used for the given host config. |
void |
setMaxTotalConnections(int maxTotalConnections)
Sets the maximum number of connections allowed. |
Methods inherited from class com.microsoft.tfs.core.httpclient.params.HttpConnectionParams |
---|
getConnectionTimeout, getLinger, getReceiveBufferSize, getSendBufferSize, getSoTimeout, getTcpNoDelay, isStaleCheckingEnabled, setConnectionTimeout, setLinger, setReceiveBufferSize, setSendBufferSize, setSoTimeout, setStaleCheckingEnabled, setTcpNoDelay |
Methods inherited from class com.microsoft.tfs.core.httpclient.params.DefaultHttpParams |
---|
clear, clone, getBooleanParameter, getDefaultParams, getDefaults, getDoubleParameter, getIntParameter, getLongParameter, getParameter, isParameterFalse, isParameterSet, isParameterSetLocally, isParameterTrue, setBooleanParameter, setDefaults, setDoubleParameter, setHttpParamsFactory, setIntParameter, setLongParameter, setParameter, setParameters |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MAX_HOST_CONNECTIONS
This parameter expects a value of type Map
. The value
should map instances of
HostConfiguration
to
integers
. The default value can be specified using
HostConfiguration.ANY_HOST_CONFIGURATION
.
"http.connection-manager.max-per-host"
public static final java.lang.String MAX_TOTAL_CONNECTIONS
This parameter expects a value of type Integer
.
"http.connection-manager.max-total"
Constructor Detail |
---|
public HttpConnectionManagerParams()
Method Detail |
---|
public void setDefaultMaxConnectionsPerHost(int maxHostConnections)
maxHostConnections
- The default maximum.MAX_HOST_CONNECTIONS
public void setMaxConnectionsPerHost(HostConfiguration hostConfiguration, int maxHostConnections)
hostConfiguration
- The host config to set the maximum for. Use
HostConfiguration.ANY_HOST_CONFIGURATION
to configure the
default value per host.maxHostConnections
- The maximum number of connections, > 0
MAX_HOST_CONNECTIONS
public int getDefaultMaxConnectionsPerHost()
MAX_HOST_CONNECTIONS
public int getMaxConnectionsPerHost(HostConfiguration hostConfiguration)
hostConfiguration
- The host config.
MAX_HOST_CONNECTIONS
public void setMaxTotalConnections(int maxTotalConnections)
maxTotalConnections
- The maximum number of connections allowed.MAX_TOTAL_CONNECTIONS
public int getMaxTotalConnections()
MAX_TOTAL_CONNECTIONS
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |