Package org.apache.http.impl.nio.conn
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:
java.io.Closeable,java.lang.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
Fields Modifier and Type Field Description private org.apache.commons.logging.Logheaderlogprivate java.lang.Stringidprivate org.apache.commons.logging.Loglogprivate org.apache.http.nio.reactor.IOSessionoriginalprivate org.apache.commons.logging.Logwirelog-
Fields inherited from class org.apache.http.impl.nio.DefaultNHttpClientConnection
requestWriter, responseParser
-
Fields 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, status
-
-
Constructor Summary
Constructors Constructor Description ManagedNHttpClientConnectionImpl(java.lang.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, 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.nio.NHttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.nio.NHttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(org.apache.http.nio.reactor.IOSession iosession)Binds connection to the given I/O session.java.lang.StringgetId()Returns connection ID which is expected to be unique for the life span of the connection manager.org.apache.http.nio.reactor.IOSessiongetIOSession()Returns the underlying I/O session.javax.net.ssl.SSLSessiongetSSLSession()Obtains the SSL session of the underlying connection, if any.protected voidonRequestSubmitted(org.apache.http.HttpRequest request)protected voidonResponseReceived(org.apache.http.HttpResponse response)java.lang.StringtoString()-
Methods inherited from class org.apache.http.impl.nio.DefaultNHttpClientConnection
consumeInput, consumeInput, createRequestWriter, createResponseParser, isRequestSubmitted, produceOutput, produceOutput, resetInput, resetOutput, submitRequest
-
Methods 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, suspendOutput
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.http.HttpConnection
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown
-
Methods inherited from interface org.apache.http.HttpInetConnection
getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort
-
Methods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, shutdown, suspendInput, suspendOutput
-
-
-
-
Constructor Detail
-
ManagedNHttpClientConnectionImpl
public ManagedNHttpClientConnectionImpl(java.lang.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, 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.nio.NHttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.nio.NHttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
-
-
Method Detail
-
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
public javax.net.ssl.SSLSession 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
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toStringin classorg.apache.http.impl.nio.NHttpConnectionBase
-
-