|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.httpclient.params.DefaultHttpParams org.apache.commons.httpclient.params.HttpConnectionParams
public class HttpConnectionParams
This class represents a collection of HTTP protocol parameters applicable to
HTTP connections
.
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 String |
CONNECTION_TIMEOUT
Determines the timeout until a connection is etablished. |
static String |
SO_LINGER
Sets SO_LINGER with the specified linger time in seconds. |
static String |
SO_RCVBUF
Determines a hint the size of the underlying buffers used by the platform for incoming network I/O. |
static String |
SO_SNDBUF
Determines a hint the size of the underlying buffers used by the platform for outgoing network I/O. |
static String |
SO_TIMEOUT
Defines the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. |
static String |
STALE_CONNECTION_CHECK
Determines whether stale connection check is to be used. |
static String |
TCP_NODELAY
Determines whether Nagle's algorithm is to be used. |
Constructor Summary | |
---|---|
HttpConnectionParams()
Creates a new collection of parameters with the collection returned by DefaultHttpParams.getDefaultParams() as a parent. |
Method Summary | |
---|---|
int |
getConnectionTimeout()
Returns the timeout until a connection is etablished. |
int |
getLinger()
Returns linger-on-close timeout. |
int |
getReceiveBufferSize()
Returns a hint the size of the underlying buffers used by the platform for incoming network I/O. |
int |
getSendBufferSize()
Returns a hint the size of the underlying buffers used by the platform for outgoing network I/O. |
int |
getSoTimeout()
Returns the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. |
boolean |
getTcpNoDelay()
Tests if Nagle's algorithm is to be used. |
boolean |
isStaleCheckingEnabled()
Tests whether stale connection check is to be used. |
void |
setConnectionTimeout(int timeout)
Sets the timeout until a connection is etablished. |
void |
setLinger(int value)
Returns linger-on-close timeout. |
void |
setReceiveBufferSize(int size)
Sets a hint the size of the underlying buffers used by the platform for incoming network I/O. |
void |
setSendBufferSize(int size)
Sets a hint the size of the underlying buffers used by the platform for outgoing network I/O. |
void |
setSoTimeout(int timeout)
Sets the default socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. |
void |
setStaleCheckingEnabled(boolean value)
Defines whether stale connection check is to be used. |
void |
setTcpNoDelay(boolean value)
Determines whether Nagle's algorithm is to be used. |
Methods inherited from class org.apache.commons.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 String SO_TIMEOUT
HTTP method parameters
.
This parameter expects a value of type Integer
.
SocketOptions.SO_TIMEOUT
,
Constant Field Valuespublic static final String TCP_NODELAY
This parameter expects a value of type Boolean
.
SocketOptions.TCP_NODELAY
,
Constant Field Valuespublic static final String SO_SNDBUF
This parameter expects a value of type Integer
.
SocketOptions.SO_SNDBUF
,
Constant Field Valuespublic static final String SO_RCVBUF
This parameter expects a value of type Integer
.
SocketOptions.SO_RCVBUF
,
Constant Field Valuespublic static final String SO_LINGER
This parameter expects a value of type Integer
.
SocketOptions.SO_LINGER
,
Constant Field Valuespublic static final String CONNECTION_TIMEOUT
This parameter expects a value of type Integer
.
public static final String STALE_CONNECTION_CHECK
This parameter expects a value of type Boolean
.
Constructor Detail |
---|
public HttpConnectionParams()
DefaultHttpParams.getDefaultParams()
as a parent. The collection will defer
to its parent for a default value if a particular parameter is not
explicitly set in the collection itself.
DefaultHttpParams.getDefaultParams()
Method Detail |
---|
public int getSoTimeout()
HTTP method parameters
.
public void setSoTimeout(int timeout)
HTTP method parameters
.
timeout
- Timeout in millisecondspublic void setTcpNoDelay(boolean value)
value
- true if the Nagle's algorithm is to NOT be used
(that is enable TCP_NODELAY), false otherwise.public boolean getTcpNoDelay()
public int getSendBufferSize()
public void setSendBufferSize(int size)
size
- the hint size of the send bufferpublic int getReceiveBufferSize()
public void setReceiveBufferSize(int size)
size
- the hint size of the send bufferpublic int getLinger()
public void setLinger(int value)
value
- the linger-on-close timeoutpublic int getConnectionTimeout()
public void setConnectionTimeout(int timeout)
timeout
- Timeout in milliseconds.public boolean isStaleCheckingEnabled()
public void setStaleCheckingEnabled(boolean value)
value
- true if stale connection check is to be used,
false otherwise.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |