Home » commons-httpclient-3.1-src » org.apache.commons » httpclient » params » [javadoc | source]
org.apache.commons.httpclient.params
public class: HttpConnectionParams [javadoc | source]
java.lang.Object
   org.apache.commons.httpclient.params.DefaultHttpParams
      org.apache.commons.httpclient.params.HttpConnectionParams

All Implemented Interfaces:
    Cloneable, Serializable, HttpParams

Direct Known Subclasses:
    HttpConnectionManagerParams

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
public static final  String SO_TIMEOUT    Defines 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 HTTP method parameters .

This parameter expects a value of type Integer .

    Also see:
    java.net.SocketOptions#SO_TIMEOUT
 
public static final  String TCP_NODELAY    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.

This parameter expects a value of type Boolean .

    Also see:
    java.net.SocketOptions#TCP_NODELAY
 
public static final  String SO_SNDBUF    Determines a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.

This parameter expects a value of type Integer .

    Also see:
    java.net.SocketOptions#SO_SNDBUF
 
public static final  String SO_RCVBUF    Determines a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.

This parameter expects a value of type Integer .

    Also see:
    java.net.SocketOptions#SO_RCVBUF
 
public static final  String SO_LINGER    Sets SO_LINGER with the specified linger time in seconds. The maximum timeout value is platform specific. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used. The setting only affects socket close.

This parameter expects a value of type Integer .

    Also see:
    java.net.SocketOptions#SO_LINGER
 
public static final  String CONNECTION_TIMEOUT    Determines the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.

This parameter expects a value of type Integer .

 
public static final  String STALE_CONNECTION_CHECK    Determines 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.

This parameter expects a value of type Boolean .

 
Constructor:
 public HttpConnectionParams() 
Method from org.apache.commons.httpclient.params.HttpConnectionParams Summary:
getConnectionTimeout,   getLinger,   getReceiveBufferSize,   getSendBufferSize,   getSoTimeout,   getTcpNoDelay,   isStaleCheckingEnabled,   setConnectionTimeout,   setLinger,   setReceiveBufferSize,   setSendBufferSize,   setSoTimeout,   setStaleCheckingEnabled,   setTcpNoDelay
Methods from 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 from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.httpclient.params.HttpConnectionParams Detail:
 public int getConnectionTimeout() 
    Returns the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
 public int getLinger() 
    Returns linger-on-close timeout. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.
 public int getReceiveBufferSize() 
    Returns a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.
 public int getSendBufferSize() 
    Returns a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.
 public int getSoTimeout() 
    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 HTTP method parameters .
 public boolean getTcpNoDelay() 
    Tests if Nagle's algorithm is to be used.
 public boolean isStaleCheckingEnabled() 
    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.
 public  void setConnectionTimeout(int timeout) 
    Sets the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
 public  void setLinger(int value) 
    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.
 public  void setReceiveBufferSize(int size) 
    Sets a hint the size of the underlying buffers used by the platform for incoming network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.
 public  void setSendBufferSize(int size) 
    Sets a hint the size of the underlying buffers used by the platform for outgoing network I/O. This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.
 public  void setSoTimeout(int timeout) 
    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 HTTP method parameters .
 public  void setStaleCheckingEnabled(boolean value) 
    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.
 public  void setTcpNoDelay(boolean value) 
    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.