public class DefaultManagedHttpClientConnection extends org.apache.http.impl.DefaultBHttpClientConnection implements ManagedHttpClientConnection, org.apache.http.protocol.HttpContext
ManagedHttpClientConnection implementation.| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<java.lang.String,java.lang.Object> |
attributes |
private java.lang.String |
id |
private boolean |
shutdown |
| Constructor and Description |
|---|
DefaultManagedHttpClientConnection(java.lang.String id,
int bufferSize) |
DefaultManagedHttpClientConnection(java.lang.String id,
int bufferSize,
int fragmentSizeHint,
java.nio.charset.CharsetDecoder charDecoder,
java.nio.charset.CharsetEncoder charEncoder,
org.apache.http.config.MessageConstraints constraints,
org.apache.http.entity.ContentLengthStrategy incomingContentStrategy,
org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy,
org.apache.http.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory,
org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(java.net.Socket socket)
Binds this connection to the given socket.
|
java.lang.Object |
getAttribute(java.lang.String id) |
java.lang.String |
getId()
Returns connection ID which is expected to be unique
for the life span of the connection manager.
|
java.net.Socket |
getSocket()
Returns the underlying socket.
|
javax.net.ssl.SSLSession |
getSSLSession()
Obtains the SSL session of the underlying connection, if any.
|
java.lang.Object |
removeAttribute(java.lang.String id) |
void |
setAttribute(java.lang.String id,
java.lang.Object obj) |
void |
shutdown() |
flush, isResponseAvailable, onRequestSubmitted, onResponseReceived, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeaderawaitInput, close, createInputStream, createOutputStream, doFlush, ensureOpen, getLocalAddress, getLocalPort, getMetrics, getRemoteAddress, getRemotePort, getSessionInputBuffer, getSessionOutputBuffer, getSocketInputStream, getSocketOutputStream, getSocketTimeout, incrementRequestCount, incrementResponseCount, isOpen, isStale, prepareInput, prepareOutput, setSocketTimeout, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitflush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeaderprivate final java.lang.String id
private final java.util.Map<java.lang.String,java.lang.Object> attributes
private volatile boolean shutdown
public DefaultManagedHttpClientConnection(java.lang.String id,
int bufferSize,
int fragmentSizeHint,
java.nio.charset.CharsetDecoder charDecoder,
java.nio.charset.CharsetEncoder charEncoder,
org.apache.http.config.MessageConstraints constraints,
org.apache.http.entity.ContentLengthStrategy incomingContentStrategy,
org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy,
org.apache.http.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory,
org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(java.lang.String id,
int bufferSize)
public java.lang.String getId()
ManagedHttpClientConnectiongetId in interface ManagedHttpClientConnectionpublic void shutdown()
throws java.io.IOException
shutdown in interface org.apache.http.HttpConnectionshutdown in class org.apache.http.impl.BHttpConnectionBasejava.io.IOExceptionpublic java.lang.Object getAttribute(java.lang.String id)
getAttribute in interface org.apache.http.protocol.HttpContextpublic java.lang.Object removeAttribute(java.lang.String id)
removeAttribute in interface org.apache.http.protocol.HttpContextpublic void setAttribute(java.lang.String id,
java.lang.Object obj)
setAttribute in interface org.apache.http.protocol.HttpContextpublic void bind(java.net.Socket socket)
throws java.io.IOException
ManagedHttpClientConnectionbind in interface ManagedHttpClientConnectionbind in class org.apache.http.impl.DefaultBHttpClientConnectionsocket - the socket to bind the connection to.java.io.IOExceptionpublic java.net.Socket getSocket()
ManagedHttpClientConnectiongetSocket in interface ManagedHttpClientConnectiongetSocket in class org.apache.http.impl.BHttpConnectionBasepublic javax.net.ssl.SSLSession getSSLSession()
ManagedHttpClientConnectionSSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.getSSLSession in interface ManagedHttpClientConnectionnull otherwise