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

    Fields
    Modifier and Type
    Field
    Description
    private final org.apache.commons.logging.Log
     
    private final String
     
    private final org.apache.commons.logging.Log
     
    private org.apache.http.nio.reactor.IOSession
     
    private final org.apache.commons.logging.Log
     

    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(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 Type
    Method
    Description
    void
    bind(org.apache.http.nio.reactor.IOSession iosession)
    Binds connection to the given I/O session.
    Returns connection ID which is expected to be unique for the life span of the connection manager.
    org.apache.http.nio.reactor.IOSession
    Returns the underlying I/O session.
    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)
     
     

    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 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

      private final String 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: 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
    • getIOSession

      public org.apache.http.nio.reactor.IOSession getIOSession()
      Description copied from interface: ManagedNHttpClientConnection
      Returns the underlying I/O session.
      Specified by:
      getIOSession in interface ManagedNHttpClientConnection
    • getSSLSession

      public SSLSession getSSLSession()
      Description copied from interface: ManagedNHttpClientConnection
      Obtains the SSL session of the underlying connection, if any.
      Specified by:
      getSSLSession in interface ManagedNHttpClientConnection
      Returns:
      the underlying SSL session if available, null otherwise
    • getId

      public 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 interface ManagedNHttpClientConnection
    • 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 String toString()
      Overrides:
      toString in class org.apache.http.impl.nio.NHttpConnectionBase