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.Log
headerlog
private java.lang.String
id
private org.apache.commons.logging.Log
log
private org.apache.http.nio.reactor.IOSession
original
private org.apache.commons.logging.Log
wirelog
-
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 void
bind(org.apache.http.nio.reactor.IOSession iosession)
Binds connection to the given I/O session.java.lang.String
getId()
Returns connection ID which is expected to be unique for the life span of the connection manager.org.apache.http.nio.reactor.IOSession
getIOSession()
Returns the underlying I/O session.javax.net.ssl.SSLSession
getSSLSession()
Obtains the SSL session of the underlying connection, if any.protected void
onRequestSubmitted(org.apache.http.HttpRequest request)
protected void
onResponseReceived(org.apache.http.HttpResponse response)
java.lang.String
toString()
-
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:ManagedNHttpClientConnection
Binds connection to the given I/O session.- Specified by:
bind
in interfaceManagedNHttpClientConnection
- Overrides:
bind
in classorg.apache.http.impl.nio.NHttpConnectionBase
-
getIOSession
public org.apache.http.nio.reactor.IOSession getIOSession()
Description copied from interface:ManagedNHttpClientConnection
Returns the underlying I/O session.- Specified by:
getIOSession
in interfaceManagedNHttpClientConnection
-
getSSLSession
public javax.net.ssl.SSLSession getSSLSession()
Description copied from interface:ManagedNHttpClientConnection
Obtains the SSL session of the underlying connection, if any.- Specified by:
getSSLSession
in interfaceManagedNHttpClientConnection
- Returns:
- the underlying SSL session if available,
null
otherwise
-
getId
public java.lang.String getId()
Description copied from interface:ManagedNHttpClientConnection
Returns connection ID which is expected to be unique for the life span of the connection manager.- Specified by:
getId
in interfaceManagedNHttpClientConnection
-
onResponseReceived
protected void onResponseReceived(org.apache.http.HttpResponse response)
- Overrides:
onResponseReceived
in classorg.apache.http.impl.nio.DefaultNHttpClientConnection
-
onRequestSubmitted
protected void onRequestSubmitted(org.apache.http.HttpRequest request)
- Overrides:
onRequestSubmitted
in classorg.apache.http.impl.nio.DefaultNHttpClientConnection
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.apache.http.impl.nio.NHttpConnectionBase
-
-