Class LoggingBHttpServerConnection

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

public class LoggingBHttpServerConnection extends org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection implements org.apache.hc.core5.util.Identifiable
  • Constructor Details

    • LoggingBHttpServerConnection

      public LoggingBHttpServerConnection(String scheme, 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.HttpMessageParserFactory<org.apache.hc.core5.http.ClassicHttpRequest> requestParserFactory, org.apache.hc.core5.http.io.HttpMessageWriterFactory<org.apache.hc.core5.http.ClassicHttpResponse> responseWriterFactory)
    • LoggingBHttpServerConnection

      public LoggingBHttpServerConnection(String scheme, 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.DefaultBHttpServerConnection
      Throws:
      IOException
    • bind

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

      protected void onRequestReceived(org.apache.hc.core5.http.ClassicHttpRequest request)
      Overrides:
      onRequestReceived in class org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
    • onResponseSubmitted

      protected void onResponseSubmitted(org.apache.hc.core5.http.ClassicHttpResponse response)
      Overrides:
      onResponseSubmitted in class org.apache.hc.core5.http.impl.io.DefaultBHttpServerConnection
    • 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