@Deprecated public final class HttpConnectionParams extends Object implements CoreConnectionPNames
HttpParams
.CONNECTION_TIMEOUT, MAX_HEADER_COUNT, MAX_LINE_LENGTH, MIN_CHUNK_LIMIT, SO_KEEPALIVE, SO_LINGER, SO_REUSEADDR, SO_TIMEOUT, SOCKET_BUFFER_SIZE, STALE_CONNECTION_CHECK, TCP_NODELAY
Modifier and Type | Method and Description |
---|---|
static int |
getConnectionTimeout(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.CONNECTION_TIMEOUT
parameter. |
static int |
getLinger(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.SO_LINGER parameter. |
static int |
getSocketBufferSize(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.SOCKET_BUFFER_SIZE
parameter. |
static boolean |
getSoKeepalive(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.SO_KEEPALIVE parameter. |
static boolean |
getSoReuseaddr(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.SO_REUSEADDR parameter. |
static int |
getSoTimeout(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.SO_TIMEOUT parameter. |
static boolean |
getTcpNoDelay(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.TCP_NODELAY parameter. |
static boolean |
isStaleCheckingEnabled(HttpParams params)
Deprecated.
Obtains value of the
CoreConnectionPNames.STALE_CONNECTION_CHECK
parameter. |
static void |
setConnectionTimeout(HttpParams params,
int timeout)
Deprecated.
Sets value of the
CoreConnectionPNames.CONNECTION_TIMEOUT
parameter. |
static void |
setLinger(HttpParams params,
int value)
Deprecated.
Sets value of the
CoreConnectionPNames.SO_LINGER parameter. |
static void |
setSocketBufferSize(HttpParams params,
int size)
Deprecated.
Sets value of the
CoreConnectionPNames.SOCKET_BUFFER_SIZE
parameter. |
static void |
setSoKeepalive(HttpParams params,
boolean enableKeepalive)
Deprecated.
Sets value of the
CoreConnectionPNames.SO_KEEPALIVE parameter. |
static void |
setSoReuseaddr(HttpParams params,
boolean reuseaddr)
Deprecated.
Sets value of the
CoreConnectionPNames.SO_REUSEADDR parameter. |
static void |
setSoTimeout(HttpParams params,
int timeout)
Deprecated.
Sets value of the
CoreConnectionPNames.SO_TIMEOUT parameter. |
static void |
setStaleCheckingEnabled(HttpParams params,
boolean value)
Deprecated.
Sets value of the
CoreConnectionPNames.STALE_CONNECTION_CHECK
parameter. |
static void |
setTcpNoDelay(HttpParams params,
boolean value)
Deprecated.
Sets value of the
CoreConnectionPNames.TCP_NODELAY parameter. |
public static int getSoTimeout(HttpParams params)
CoreConnectionPNames.SO_TIMEOUT
parameter.
If not set, defaults to 0
.params
- HTTP parameters.public static void setSoTimeout(HttpParams params, int timeout)
CoreConnectionPNames.SO_TIMEOUT
parameter.params
- HTTP parameters.timeout
- SO_TIMEOUT.public static boolean getSoReuseaddr(HttpParams params)
CoreConnectionPNames.SO_REUSEADDR
parameter.
If not set, defaults to false
.params
- HTTP parameters.public static void setSoReuseaddr(HttpParams params, boolean reuseaddr)
CoreConnectionPNames.SO_REUSEADDR
parameter.params
- HTTP parameters.reuseaddr
- SO_REUSEADDR.public static boolean getTcpNoDelay(HttpParams params)
CoreConnectionPNames.TCP_NODELAY
parameter.
If not set, defaults to true
.params
- HTTP parameters.public static void setTcpNoDelay(HttpParams params, boolean value)
CoreConnectionPNames.TCP_NODELAY
parameter.params
- HTTP parameters.value
- Nagle's algorithm flagpublic static int getSocketBufferSize(HttpParams params)
CoreConnectionPNames.SOCKET_BUFFER_SIZE
parameter. If not set, defaults to -1
.params
- HTTP parameters.public static void setSocketBufferSize(HttpParams params, int size)
CoreConnectionPNames.SOCKET_BUFFER_SIZE
parameter.params
- HTTP parameters.size
- socket buffer sizepublic static int getLinger(HttpParams params)
CoreConnectionPNames.SO_LINGER
parameter.
If not set, defaults to -1
.params
- HTTP parameters.public static void setLinger(HttpParams params, int value)
CoreConnectionPNames.SO_LINGER
parameter.params
- HTTP parameters.value
- SO_LINGER.public static int getConnectionTimeout(HttpParams params)
CoreConnectionPNames.CONNECTION_TIMEOUT
parameter. If not set, defaults to 0
.params
- HTTP parameters.public static void setConnectionTimeout(HttpParams params, int timeout)
CoreConnectionPNames.CONNECTION_TIMEOUT
parameter.params
- HTTP parameters.timeout
- connect timeout.public static boolean isStaleCheckingEnabled(HttpParams params)
CoreConnectionPNames.STALE_CONNECTION_CHECK
parameter. If not set, defaults to true
.params
- HTTP parameters.public static void setStaleCheckingEnabled(HttpParams params, boolean value)
CoreConnectionPNames.STALE_CONNECTION_CHECK
parameter.params
- HTTP parameters.value
- stale connection check flag.public static boolean getSoKeepalive(HttpParams params)
CoreConnectionPNames.SO_KEEPALIVE
parameter.
If not set, defaults to false
.params
- HTTP parameters.public static void setSoKeepalive(HttpParams params, boolean enableKeepalive)
CoreConnectionPNames.SO_KEEPALIVE
parameter.params
- HTTP parameters.enableKeepalive
- SO_KEEPALIVE.Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.