@NotThreadSafe public class DefaultManagedHttpClientConnection extends DefaultBHttpClientConnection implements ManagedHttpClientConnection, HttpContext
ManagedHttpClientConnection implementation.RESERVED_PREFIX| 构造器和说明 |
|---|
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,
MessageConstraints constraints,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
HttpMessageParserFactory<HttpResponse> responseParserFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
bind(java.net.Socket socket)
Binds this connection to the given
Socket. |
java.lang.Object |
getAttribute(java.lang.String id)
Obtains attribute with the given name.
|
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)
Removes attribute with the given name from the context.
|
void |
setAttribute(java.lang.String id,
java.lang.Object obj)
Sets value of the attribute with the given name.
|
void |
shutdown()
Force-closes this connection.
|
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, sendRequestHeadergetLocalAddress, getLocalPort, getRemoteAddress, getRemotePortclose, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeoutpublic DefaultManagedHttpClientConnection(java.lang.String id,
int buffersize,
int fragmentSizeHint,
java.nio.charset.CharsetDecoder chardecoder,
java.nio.charset.CharsetEncoder charencoder,
MessageConstraints constraints,
ContentLengthStrategy incomingContentStrategy,
ContentLengthStrategy outgoingContentStrategy,
HttpMessageWriterFactory<HttpRequest> requestWriterFactory,
HttpMessageParserFactory<HttpResponse> responseParserFactory)
public DefaultManagedHttpClientConnection(java.lang.String id,
int buffersize)
public java.lang.String getId()
ManagedHttpClientConnectiongetId 在接口中 ManagedHttpClientConnectionpublic void shutdown()
throws java.io.IOException
HttpConnectionshutdown 在接口中 HttpConnectionshutdown 在类中 BHttpConnectionBasejava.io.IOExceptionpublic java.lang.Object getAttribute(java.lang.String id)
HttpContextgetAttribute 在接口中 HttpContextid - the attribute name.null if not set.public java.lang.Object removeAttribute(java.lang.String id)
HttpContextremoveAttribute 在接口中 HttpContextid - the attribute name.null if not set.public void setAttribute(java.lang.String id,
java.lang.Object obj)
HttpContextsetAttribute 在接口中 HttpContextid - the attribute name.obj - the attribute value.public void bind(java.net.Socket socket)
throws java.io.IOException
BHttpConnectionBaseSocket. This socket will be
used by the connection to send and receive data.
After this method's execution the connection status will be reported
as open and the BHttpConnectionBase.isOpen() will return true.bind 在接口中 ManagedHttpClientConnectionbind 在类中 DefaultBHttpClientConnectionsocket - the socket.java.io.IOException - in case of an I/O error.public java.net.Socket getSocket()
ManagedHttpClientConnectiongetSocket 在接口中 ManagedHttpClientConnectiongetSocket 在类中 BHttpConnectionBasepublic javax.net.ssl.SSLSession getSSLSession()
ManagedHttpClientConnectionSSLSocket, the SSL session of
that socket is obtained. This is a potentially blocking operation.getSSLSession 在接口中 ManagedHttpClientConnectionnull otherwise