Class 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
      • Fields inherited from interface org.apache.http.nio.NHttpConnection

        ACTIVE, CLOSED, CLOSING
    • 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
      • Methods inherited from interface org.apache.http.nio.NHttpClientConnection

        isRequestSubmitted, resetInput, resetOutput, submitRequest
      • Methods inherited from interface org.apache.http.nio.NHttpConnection

        getContext, getHttpRequest, getHttpResponse, getStatus
    • Field Detail

      • 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

        private final java.lang.String id
      • original

        private org.apache.http.nio.reactor.IOSession original
    • 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 interface ManagedNHttpClientConnection
        Overrides:
        bind in class org.apache.http.impl.nio.NHttpConnectionBase
      • onResponseReceived

        protected void onResponseReceived​(org.apache.http.HttpResponse response)
        Overrides:
        onResponseReceived in class org.apache.http.impl.nio.DefaultNHttpClientConnection
      • onRequestSubmitted

        protected void onRequestSubmitted​(org.apache.http.HttpRequest request)
        Overrides:
        onRequestSubmitted in class org.apache.http.impl.nio.DefaultNHttpClientConnection
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.apache.http.impl.nio.NHttpConnectionBase