Class CPoolProxy

java.lang.Object
org.apache.http.impl.nio.conn.CPoolProxy
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.NHttpConnection

class CPoolProxy extends Object implements ManagedNHttpClientConnection
  • Field Details

    • poolEntry

      private volatile CPoolEntry poolEntry
  • Constructor Details

  • Method Details

    • getPoolEntry

      CPoolEntry getPoolEntry()
    • detach

      CPoolEntry detach()
    • getConnection

    • getValidConnection

      ManagedNHttpClientConnection getValidConnection()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.http.HttpConnection
      Throws:
      IOException
    • shutdown

      public void shutdown() throws IOException
      Specified by:
      shutdown in interface org.apache.http.HttpConnection
      Specified by:
      shutdown in interface org.apache.http.nio.IOControl
      Throws:
      IOException
    • getMetrics

      public org.apache.http.HttpConnectionMetrics getMetrics()
      Specified by:
      getMetrics in interface org.apache.http.HttpConnection
    • requestInput

      public void requestInput()
      Specified by:
      requestInput in interface org.apache.http.nio.IOControl
    • suspendInput

      public void suspendInput()
      Specified by:
      suspendInput in interface org.apache.http.nio.IOControl
    • requestOutput

      public void requestOutput()
      Specified by:
      requestOutput in interface org.apache.http.nio.IOControl
    • suspendOutput

      public void suspendOutput()
      Specified by:
      suspendOutput in interface org.apache.http.nio.IOControl
    • getLocalAddress

      public InetAddress getLocalAddress()
      Specified by:
      getLocalAddress in interface org.apache.http.HttpInetConnection
    • getLocalPort

      public int getLocalPort()
      Specified by:
      getLocalPort in interface org.apache.http.HttpInetConnection
    • getRemoteAddress

      public InetAddress getRemoteAddress()
      Specified by:
      getRemoteAddress in interface org.apache.http.HttpInetConnection
    • getRemotePort

      public int getRemotePort()
      Specified by:
      getRemotePort in interface org.apache.http.HttpInetConnection
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.apache.http.HttpConnection
    • isStale

      public boolean isStale()
      Specified by:
      isStale in interface org.apache.http.HttpConnection
    • setSocketTimeout

      public void setSocketTimeout(int i)
      Specified by:
      setSocketTimeout in interface org.apache.http.HttpConnection
    • getSocketTimeout

      public int getSocketTimeout()
      Specified by:
      getSocketTimeout in interface org.apache.http.HttpConnection
    • submitRequest

      public void submitRequest(org.apache.http.HttpRequest request) throws IOException, org.apache.http.HttpException
      Specified by:
      submitRequest in interface org.apache.http.nio.NHttpClientConnection
      Throws:
      IOException
      org.apache.http.HttpException
    • isRequestSubmitted

      public boolean isRequestSubmitted()
      Specified by:
      isRequestSubmitted in interface org.apache.http.nio.NHttpClientConnection
    • resetOutput

      public void resetOutput()
      Specified by:
      resetOutput in interface org.apache.http.nio.NHttpClientConnection
    • resetInput

      public void resetInput()
      Specified by:
      resetInput in interface org.apache.http.nio.NHttpClientConnection
    • getStatus

      public int getStatus()
      Specified by:
      getStatus in interface org.apache.http.nio.NHttpConnection
    • getHttpRequest

      public org.apache.http.HttpRequest getHttpRequest()
      Specified by:
      getHttpRequest in interface org.apache.http.nio.NHttpConnection
    • getHttpResponse

      public org.apache.http.HttpResponse getHttpResponse()
      Specified by:
      getHttpResponse in interface org.apache.http.nio.NHttpConnection
    • getContext

      public org.apache.http.protocol.HttpContext getContext()
      Specified by:
      getContext in interface org.apache.http.nio.NHttpConnection
    • newProxy

      public static org.apache.http.nio.NHttpClientConnection newProxy(CPoolEntry poolEntry)
    • getProxy

      private static CPoolProxy getProxy(org.apache.http.nio.NHttpClientConnection conn)
    • getPoolEntry

      public static CPoolEntry getPoolEntry(org.apache.http.nio.NHttpClientConnection proxy)
    • detach

      public static CPoolEntry detach(org.apache.http.nio.NHttpClientConnection proxy)
    • 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
    • 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
    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object