Class LoggingBHttpClientConnection

java.lang.Object
org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
org.apache.hc.core5.testing.classic.LoggingBHttpClientConnection
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.HttpConnection, org.apache.hc.core5.http.io.BHttpConnection, org.apache.hc.core5.http.io.HttpClientConnection, org.apache.hc.core5.http.SocketModalCloseable, org.apache.hc.core5.io.ModalCloseable, org.apache.hc.core5.util.Identifiable

public class LoggingBHttpClientConnection extends org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection implements org.apache.hc.core5.util.Identifiable
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config)
     
    LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy, org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    awaitInput(org.apache.hc.core5.util.Timeout arg0)
     
    void
    bind(Socket socket)
     
    void
    bind(SSLSocket sslSocket, Socket baseSocket)
     
    protected void
    bind(org.apache.hc.core5.http.impl.io.SocketHolder arg0)
     
    void
     
    void
    close(org.apache.hc.core5.io.CloseMode closeMode)
     
    protected InputStream
    createContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1, InputStream arg2)
     
    protected OutputStream
    createContentOutputStream(long arg0, org.apache.hc.core5.http.io.SessionOutputBuffer arg1, OutputStream arg2, org.apache.hc.core5.function.Supplier<List<? extends org.apache.hc.core5.http.Header>> arg3)
     
    protected org.apache.hc.core5.http.impl.io.SocketHolder
     
    void
     
    org.apache.hc.core5.http.EndpointDetails
     
     
     
    org.apache.hc.core5.http.ProtocolVersion
     
     
    protected org.apache.hc.core5.http.impl.io.SocketHolder
     
    org.apache.hc.core5.util.Timeout
     
     
    protected void
     
    protected void
     
    boolean
    isDataAvailable(org.apache.hc.core5.util.Timeout arg0)
     
    boolean
     
    boolean
     
    protected void
    onRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request)
     
    protected void
    onResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response)
     
    void
    setSocketTimeout(org.apache.hc.core5.util.Timeout arg0)
     
     

    Methods inherited from class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection

    isConsistent, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader, terminateRequest, terminateRequest

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.hc.core5.http.io.BHttpConnection

    flush, isDataAvailable, isStale

    Methods inherited from interface org.apache.hc.core5.http.HttpConnection

    getEndpointDetails, getLocalAddress, getProtocolVersion, getRemoteAddress, getSSLSession, isIdle, isOpen

    Methods inherited from interface org.apache.hc.core5.http.SocketModalCloseable

    getSocketTimeout, setSocketTimeout
  • Constructor Details

    • LoggingBHttpClientConnection

      public LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config, CharsetDecoder charDecoder, CharsetEncoder charEncoder, org.apache.hc.core5.http.ContentLengthStrategy incomingContentStrategy, org.apache.hc.core5.http.ContentLengthStrategy outgoingContentStrategy, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestWriterFactory, org.apache.hc.core5.http.io.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseParserFactory)
    • LoggingBHttpClientConnection

      public LoggingBHttpClientConnection(org.apache.hc.core5.http.config.Http1Config http1Config)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.apache.hc.core5.util.Identifiable
    • 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.hc.core5.http.HttpConnection
      Throws:
      IOException
    • close

      public void close(org.apache.hc.core5.io.CloseMode closeMode)
      Specified by:
      close in interface org.apache.hc.core5.io.ModalCloseable
    • bind

      public void bind(Socket socket) throws IOException
      Overrides:
      bind in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
      Throws:
      IOException
    • bind

      public void bind(SSLSocket sslSocket, Socket baseSocket) throws IOException
      Overrides:
      bind in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
      Throws:
      IOException
      Since:
      5.3
    • onResponseReceived

      protected void onResponseReceived(org.apache.hc.core5.http.ClassicHttpResponse response)
      Overrides:
      onResponseReceived in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
    • onRequestSubmitted

      protected void onRequestSubmitted(org.apache.hc.core5.http.ClassicHttpRequest request)
      Overrides:
      onRequestSubmitted in class org.apache.hc.core5.http.impl.io.DefaultBHttpClientConnection
    • ensureOpen

      protected org.apache.hc.core5.http.impl.io.SocketHolder ensureOpen() throws IOException
      Throws:
      IOException
    • bind

      protected void bind(org.apache.hc.core5.http.impl.io.SocketHolder arg0) throws IOException
      Throws:
      IOException
    • isOpen

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

      public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()
      Specified by:
      getProtocolVersion in interface org.apache.hc.core5.http.HttpConnection
    • getSocketHolder

      protected org.apache.hc.core5.http.impl.io.SocketHolder getSocketHolder()
    • createContentOutputStream

      protected OutputStream createContentOutputStream(long arg0, org.apache.hc.core5.http.io.SessionOutputBuffer arg1, OutputStream arg2, org.apache.hc.core5.function.Supplier<List<? extends org.apache.hc.core5.http.Header>> arg3)
    • createContentInputStream

      protected InputStream createContentInputStream(long arg0, org.apache.hc.core5.http.io.SessionInputBuffer arg1, InputStream arg2)
    • getRemoteAddress

      public SocketAddress getRemoteAddress()
      Specified by:
      getRemoteAddress in interface org.apache.hc.core5.http.HttpConnection
    • getLocalAddress

      public SocketAddress getLocalAddress()
      Specified by:
      getLocalAddress in interface org.apache.hc.core5.http.HttpConnection
    • setSocketTimeout

      public void setSocketTimeout(org.apache.hc.core5.util.Timeout arg0)
      Specified by:
      setSocketTimeout in interface org.apache.hc.core5.http.SocketModalCloseable
    • getSocketTimeout

      public org.apache.hc.core5.util.Timeout getSocketTimeout()
      Specified by:
      getSocketTimeout in interface org.apache.hc.core5.http.SocketModalCloseable
    • awaitInput

      protected boolean awaitInput(org.apache.hc.core5.util.Timeout arg0) throws IOException
      Throws:
      IOException
    • isDataAvailable

      public boolean isDataAvailable(org.apache.hc.core5.util.Timeout arg0) throws IOException
      Specified by:
      isDataAvailable in interface org.apache.hc.core5.http.io.BHttpConnection
      Throws:
      IOException
    • isStale

      public boolean isStale() throws IOException
      Specified by:
      isStale in interface org.apache.hc.core5.http.io.BHttpConnection
      Throws:
      IOException
    • flush

      public void flush() throws IOException
      Specified by:
      flush in interface org.apache.hc.core5.http.io.BHttpConnection
      Throws:
      IOException
    • incrementRequestCount

      protected void incrementRequestCount()
    • incrementResponseCount

      protected void incrementResponseCount()
    • getSSLSession

      public SSLSession getSSLSession()
      Specified by:
      getSSLSession in interface org.apache.hc.core5.http.HttpConnection
    • getEndpointDetails

      public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()
      Specified by:
      getEndpointDetails in interface org.apache.hc.core5.http.HttpConnection
    • toString

      public String toString()
      Overrides:
      toString in class Object