HttpConnectionParams
classHttpConnectionParams: CoreConnectionPNames
kotlin.Any | |
↳ | org.apache.http.params.HttpConnectionParams |
An adaptor for accessing connection parameters in HttpParams
.
Note that the implements relation to CoreConnectionPNames
is for compatibility with existing application code only. References to the parameter names should use the interface, not this class.
Summary
Inherited constants | |
---|---|
Public methods | |
---|---|
static Int |
getConnectionTimeout(params: HttpParams!) Returns the timeout until a connection is etablished. |
static Int |
getLinger(params: HttpParams!) Returns linger-on-close timeout. |
static Int |
getSoTimeout(params: HttpParams!) Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. |
static Int |
getSocketBufferSize(params: HttpParams!) |
static Boolean |
getTcpNoDelay(params: HttpParams!) Tests if Nagle's algorithm is to be used. |
static Boolean |
isStaleCheckingEnabled(params: HttpParams!) Tests whether stale connection check is to be used. |
static Unit |
setConnectionTimeout(params: HttpParams!, timeout: Int) Sets the timeout until a connection is etablished. |
static Unit |
setLinger(params: HttpParams!, value: Int) Returns linger-on-close timeout. |
static Unit |
setSoTimeout(params: HttpParams!, timeout: Int) Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. |
static Unit |
setSocketBufferSize(params: HttpParams!, size: Int) |
static Unit |
setStaleCheckingEnabled(params: HttpParams!, value: Boolean) Defines whether stale connection check is to be used. |
static Unit |
setTcpNoDelay(params: HttpParams!, value: Boolean) Determines whether Nagle's algorithm is to be used. |
Public methods
getConnectionTimeout
static fungetConnectionTimeout(params: HttpParams!): Int
Deprecated: Deprecated in Java.
Returns the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
Return | |
---|---|
Int |
timeout in milliseconds. |
getLinger
static fungetLinger(params: HttpParams!): Int
Deprecated: Deprecated in Java.
Returns linger-on-close timeout. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.
Return | |
---|---|
Int |
the linger-on-close timeout |
getSoTimeout
static fungetSoTimeout(params: HttpParams!): Int
Deprecated: Deprecated in Java.
Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. This value is used when no socket timeout is set in the method parameters.
Return | |
---|---|
Int |
timeout in milliseconds |
getSocketBufferSize
static fungetSocketBufferSize(params: HttpParams!): Int
Deprecated: Deprecated in Java.
getTcpNoDelay
static fungetTcpNoDelay(params: HttpParams!): Boolean
Deprecated: Deprecated in Java.
Tests if Nagle's algorithm is to be used.
Return | |
---|---|
Boolean |
true if the Nagle's algorithm is to NOT be used (that is enable TCP_NODELAY), false otherwise. |
isStaleCheckingEnabled
static funisStaleCheckingEnabled(params: HttpParams!): Boolean
Deprecated: Deprecated in Java.
Tests whether stale connection check is to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.
Return | |
---|---|
Boolean |
true if stale connection check is to be used, false otherwise. |
setConnectionTimeout
static funsetConnectionTimeout(
params: HttpParams!,
timeout: Int
): Unit
Deprecated: Deprecated in Java.
Sets the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
Parameters | |
---|---|
timeout |
Int: Timeout in milliseconds. |
setLinger
static funsetLinger(
params: HttpParams!,
value: Int
): Unit
Deprecated: Deprecated in Java.
Returns linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.
Parameters | |
---|---|
value |
Int: the linger-on-close timeout |
setSoTimeout
static funsetSoTimeout(
params: HttpParams!,
timeout: Int
): Unit
Deprecated: Deprecated in Java.
Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout. This value is used when no socket timeout is set in the method parameters.
Parameters | |
---|---|
timeout |
Int: Timeout in milliseconds |
setSocketBufferSize
static funsetSocketBufferSize(
params: HttpParams!,
size: Int
): Unit
Deprecated: Deprecated in Java.
setStaleCheckingEnabled
static funsetStaleCheckingEnabled(
params: HttpParams!,
value: Boolean
): Unit
Deprecated: Deprecated in Java.
Defines whether stale connection check is to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.
Parameters | |
---|---|
value |
Boolean: true if stale connection check is to be used, false otherwise. |
setTcpNoDelay
static funsetTcpNoDelay(
params: HttpParams!,
value: Boolean
): Unit
Deprecated: Deprecated in Java.
Determines whether Nagle's algorithm is to be used. The Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent. When applications wish to decrease network latency and increase performance, they can disable Nagle's algorithm (that is enable TCP_NODELAY). Data will be sent earlier, at the cost of an increase in bandwidth consumption.
Parameters | |
---|---|
value |
Boolean: true if the Nagle's algorithm is to NOT be used (that is enable TCP_NODELAY), false otherwise. |