Class ManagedNHttpClientConnectionImpl
java.lang.Object
org.apache.http.impl.nio.NHttpConnectionBase
org.apache.http.impl.nio.DefaultNHttpClientConnection
org.apache.http.impl.nio.conn.ManagedNHttpClientConnectionImpl
- All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.http.HttpConnection, org.apache.http.HttpInetConnection, ManagedNHttpClientConnection, org.apache.http.nio.IOControl, org.apache.http.nio.NHttpClientConnection, org.apache.http.nio.NHttpClientIOTarget, org.apache.http.nio.NHttpConnection, org.apache.http.nio.reactor.SessionBufferStatus, org.apache.http.nio.reactor.SocketAccessor
class ManagedNHttpClientConnectionImpl
extends org.apache.http.impl.nio.DefaultNHttpClientConnection
implements ManagedNHttpClientConnection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.commons.logging.Logprivate final Stringprivate final org.apache.commons.logging.Logprivate org.apache.http.nio.reactor.IOSessionprivate final org.apache.commons.logging.LogFields inherited from class org.apache.http.impl.nio.DefaultNHttpClientConnection
requestWriter, responseParserFields inherited from class org.apache.http.impl.nio.NHttpConnectionBase
connMetrics, contentDecoder, contentEncoder, context, hasBufferedInput, hasBufferedOutput, inbuf, incomingContentStrategy, inTransportMetrics, outbuf, outgoingContentStrategy, outTransportMetrics, remote, request, response, session, statusFields inherited from interface org.apache.http.nio.NHttpConnection
ACTIVE, CLOSED, CLOSING -
Constructor Summary
ConstructorsConstructorDescriptionManagedNHttpClientConnectionImpl(String id, org.apache.commons.logging.Log log, org.apache.commons.logging.Log headerlog, org.apache.commons.logging.Log wirelog, org.apache.http.nio.reactor.IOSession iosession, int buffersize, int fragmentSizeHint, org.apache.http.nio.util.ByteBufferAllocator allocator, CharsetDecoder chardecoder, CharsetEncoder charencoder, org.apache.http.config.MessageConstraints constraints, org.apache.http.entity.ContentLengthStrategy incomingContentStrategy, org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy, org.apache.http.nio.NHttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.nio.NHttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidbind(org.apache.http.nio.reactor.IOSession iosession) Binds connection to the given I/O session.getId()Returns connection ID which is expected to be unique for the life span of the connection manager.org.apache.http.nio.reactor.IOSessionReturns the underlying I/O session.Obtains the SSL session of the underlying connection, if any.protected voidonRequestSubmitted(org.apache.http.HttpRequest request) protected voidonResponseReceived(org.apache.http.HttpResponse response) toString()Methods inherited from class org.apache.http.impl.nio.DefaultNHttpClientConnection
consumeInput, consumeInput, createRequestWriter, createResponseParser, isRequestSubmitted, produceOutput, produceOutput, resetInput, resetOutput, submitRequestMethods inherited from class org.apache.http.impl.nio.NHttpConnectionBase
assertNotClosed, close, createConnectionMetrics, createContentDecoder, createContentEncoder, createIncomingContentStrategy, createOutgoingContentStrategy, createTransportMetrics, getContext, getHttpRequest, getHttpResponse, getLocalAddress, getLocalPort, getMetrics, getRemoteAddress, getRemotePort, getSocket, getSocketTimeout, getStatus, hasBufferedInput, hasBufferedOutput, isOpen, isStale, prepareDecoder, prepareEncoder, requestInput, requestOutput, setSocketTimeout, shutdown, suspendInput, suspendOutputMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.http.HttpConnection
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdownMethods inherited from interface org.apache.http.HttpInetConnection
getLocalAddress, getLocalPort, getRemoteAddress, getRemotePortMethods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, shutdown, suspendInput, suspendOutputMethods inherited from interface org.apache.http.nio.NHttpClientConnection
isRequestSubmitted, resetInput, resetOutput, submitRequestMethods inherited from interface org.apache.http.nio.NHttpConnection
getContext, getHttpRequest, getHttpResponse, getStatus
-
Field Details
-
headerlog
private final org.apache.commons.logging.Log headerlog -
wirelog
private final org.apache.commons.logging.Log wirelog -
log
private final org.apache.commons.logging.Log log -
id
-
original
private org.apache.http.nio.reactor.IOSession original
-
-
Constructor Details
-
ManagedNHttpClientConnectionImpl
public ManagedNHttpClientConnectionImpl(String id, org.apache.commons.logging.Log log, org.apache.commons.logging.Log headerlog, org.apache.commons.logging.Log wirelog, org.apache.http.nio.reactor.IOSession iosession, int buffersize, int fragmentSizeHint, org.apache.http.nio.util.ByteBufferAllocator allocator, CharsetDecoder chardecoder, CharsetEncoder charencoder, org.apache.http.config.MessageConstraints constraints, org.apache.http.entity.ContentLengthStrategy incomingContentStrategy, org.apache.http.entity.ContentLengthStrategy outgoingContentStrategy, org.apache.http.nio.NHttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.nio.NHttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
-
-
Method Details
-
bind
public void bind(org.apache.http.nio.reactor.IOSession iosession) Description copied from interface:ManagedNHttpClientConnectionBinds connection to the given I/O session.- Specified by:
bindin interfaceManagedNHttpClientConnection- Overrides:
bindin classorg.apache.http.impl.nio.NHttpConnectionBase
-
getIOSession
public org.apache.http.nio.reactor.IOSession getIOSession()Description copied from interface:ManagedNHttpClientConnectionReturns the underlying I/O session.- Specified by:
getIOSessionin interfaceManagedNHttpClientConnection
-
getSSLSession
Description copied from interface:ManagedNHttpClientConnectionObtains the SSL session of the underlying connection, if any.- Specified by:
getSSLSessionin interfaceManagedNHttpClientConnection- Returns:
- the underlying SSL session if available,
nullotherwise
-
getId
Description copied from interface:ManagedNHttpClientConnectionReturns connection ID which is expected to be unique for the life span of the connection manager.- Specified by:
getIdin interfaceManagedNHttpClientConnection
-
onResponseReceived
protected void onResponseReceived(org.apache.http.HttpResponse response) - Overrides:
onResponseReceivedin classorg.apache.http.impl.nio.DefaultNHttpClientConnection
-
onRequestSubmitted
protected void onRequestSubmitted(org.apache.http.HttpRequest request) - Overrides:
onRequestSubmittedin classorg.apache.http.impl.nio.DefaultNHttpClientConnection
-
toString
- Overrides:
toStringin classorg.apache.http.impl.nio.NHttpConnectionBase
-