public class ServicePointManager extends Object
Manages the collection of ServicePoint objects.
Constructor and Description |
---|
ServicePointManager() |
Modifier and Type | Method and Description |
---|---|
static int |
getDefaultConnectionLimit()
Gets or sets the maximum number of concurrent connections allowed by a ServicePoint object.
|
static boolean |
getExpect100Continue()
Gets or sets a Boolean value that determines whether 100-Continue behavior is used.
|
static int |
getMaxServicePointIdleTime()
Gets or sets the maximum idle time of a ServicePoint object.
|
static int |
getMaxServicePoints()
Gets or sets the maximum number of ServicePoint objects to maintain at any time.
|
static boolean |
getUseNagleAlgorithm()
Determines whether the Nagle algorithm is used by the service points managed by this ServicePointManager object.
|
static void |
setDefaultConnectionLimit(int value)
Gets or sets the maximum number of concurrent connections allowed by a ServicePoint object.
|
static void |
setExpect100Continue(boolean value)
Gets or sets a Boolean value that determines whether 100-Continue behavior is used.
|
static void |
setMaxServicePointIdleTime(int value)
Gets or sets the maximum idle time of a ServicePoint object.
|
static void |
setMaxServicePoints(int value)
Gets or sets the maximum number of ServicePoint objects to maintain at any time.
|
static void |
setTcpKeepAlive(boolean enabled,
int keepAliveTime,
int keepAliveInterval)
Enables or disables the keep-alive option on a TCP connection.
|
static void |
setUseNagleAlgorithm(boolean value)
Determines whether the Nagle algorithm is used by the service points managed by this ServicePointManager object.
|
public static int getDefaultConnectionLimit()
Gets or sets the maximum number of concurrent connections allowed by a ServicePoint object.
public static void setDefaultConnectionLimit(int value)
Gets or sets the maximum number of concurrent connections allowed by a ServicePoint object.
public static int getMaxServicePointIdleTime()
Gets or sets the maximum idle time of a ServicePoint object.
public static void setMaxServicePointIdleTime(int value)
Gets or sets the maximum idle time of a ServicePoint object.
public static int getMaxServicePoints()
Gets or sets the maximum number of ServicePoint objects to maintain at any time.
public static void setMaxServicePoints(int value)
Gets or sets the maximum number of ServicePoint objects to maintain at any time.
public static boolean getExpect100Continue()
Gets or sets a Boolean value that determines whether 100-Continue behavior is used.
public static void setExpect100Continue(boolean value)
Gets or sets a Boolean value that determines whether 100-Continue behavior is used.
public static boolean getUseNagleAlgorithm()
Determines whether the Nagle algorithm is used by the service points managed by this ServicePointManager object.
public static void setUseNagleAlgorithm(boolean value)
Determines whether the Nagle algorithm is used by the service points managed by this ServicePointManager object.
public static void setTcpKeepAlive(boolean enabled, int keepAliveTime, int keepAliveInterval)
Enables or disables the keep-alive option on a TCP connection.
enabled
- If set to true, then the TCP keep-alive option on a TCP connection will be enabled using the specified keepAliveTime and keepAliveInterval values.keepAliveTime
- Specifies the timeout, in milliseconds, with no activity until the first keep-alive packet is sent.keepAliveInterval
- Specifies the interval, in milliseconds, between when successive keep-alive packets are sent if no acknowledgement is received.