@NotThreadSafe public class DefaultHttpClientConnection extends SocketHttpClientConnection
The following parameters can be used to customize the behavior of this class:
CoreProtocolPNames.HTTP_ELEMENT_CHARSET
CoreConnectionPNames.TCP_NODELAY
CoreConnectionPNames.SO_TIMEOUT
CoreConnectionPNames.SO_LINGER
CoreConnectionPNames.SO_KEEPALIVE
CoreConnectionPNames.SOCKET_BUFFER_SIZE
CoreConnectionPNames.MAX_LINE_LENGTH
CoreConnectionPNames.MAX_HEADER_COUNT
CoreConnectionPNames.MIN_CHUNK_LIMIT
Constructor and Description |
---|
DefaultHttpClientConnection() |
Modifier and Type | Method and Description |
---|---|
void |
bind(Socket socket,
HttpParams params)
Binds this connection to the given
Socket . |
assertNotOpen, assertOpen, close, createSessionInputBuffer, createSessionOutputBuffer, getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort, getSocket, getSocketTimeout, isOpen, setSocketTimeout, shutdown, toString
createConnectionMetrics, createEntityDeserializer, createEntitySerializer, createHttpResponseFactory, createRequestWriter, createResponseParser, doFlush, flush, getMetrics, init, isEof, isResponseAvailable, isStale, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMetrics, isStale
public void bind(Socket socket, HttpParams params) throws IOException
SocketHttpClientConnection
Socket
. This socket will be
used by the connection to send and receive data.
This method will invoke SocketHttpClientConnection.createSessionInputBuffer(Socket, int, HttpParams)
and SocketHttpClientConnection.createSessionOutputBuffer(Socket, int, HttpParams)
methods
to create session input / output buffers bound to this socket and then
will invoke AbstractHttpClientConnection.init(SessionInputBuffer, SessionOutputBuffer, HttpParams)
method to pass references to those buffers to the underlying HTTP message
parser and formatter.
After this method's execution the connection status will be reported
as open and the SocketHttpClientConnection.isOpen()
will return true
.
bind
in class SocketHttpClientConnection
socket
- the socket.params
- HTTP parameters.IOException
- in case of an I/O error.Copyright © 2005-2015 The Apache Software Foundation. All Rights Reserved.