Class LoggingManagedHttpClientConnection

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ManagedHttpClientConnection, org.apache.http.HttpClientConnection, org.apache.http.HttpConnection, org.apache.http.HttpInetConnection, org.apache.http.protocol.HttpContext

    class LoggingManagedHttpClientConnection
    extends DefaultManagedHttpClientConnection
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.apache.commons.logging.Log headerLog  
      private org.apache.commons.logging.Log log  
      private Wire wire  
      • Fields inherited from interface org.apache.http.protocol.HttpContext

        RESERVED_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      LoggingManagedHttpClientConnection​(java.lang.String id, org.apache.commons.logging.Log log, org.apache.commons.logging.Log headerLog, org.apache.commons.logging.Log wireLog, int bufferSize, int fragmentSizeHint, 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.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory, org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      protected java.io.InputStream getSocketInputStream​(java.net.Socket socket)  
      protected java.io.OutputStream getSocketOutputStream​(java.net.Socket socket)  
      protected void onRequestSubmitted​(org.apache.http.HttpRequest request)  
      protected void onResponseReceived​(org.apache.http.HttpResponse response)  
      void setSocketTimeout​(int timeout)  
      void shutdown()  
      • Methods inherited from class org.apache.http.impl.DefaultBHttpClientConnection

        flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
      • Methods inherited from class org.apache.http.impl.BHttpConnectionBase

        awaitInput, createInputStream, createOutputStream, doFlush, ensureOpen, getLocalAddress, getLocalPort, getMetrics, getRemoteAddress, getRemotePort, getSessionInputBuffer, getSessionOutputBuffer, getSocketTimeout, incrementRequestCount, incrementResponseCount, isOpen, isStale, prepareInput, prepareOutput, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.http.HttpClientConnection

        flush, isResponseAvailable, receiveResponseEntity, receiveResponseHeader, sendRequestEntity, sendRequestHeader
      • Methods inherited from interface org.apache.http.HttpConnection

        getMetrics, getSocketTimeout, isOpen, isStale
      • Methods inherited from interface org.apache.http.HttpInetConnection

        getLocalAddress, getLocalPort, getRemoteAddress, getRemotePort
    • Field Detail

      • log

        private final org.apache.commons.logging.Log log
      • headerLog

        private final org.apache.commons.logging.Log headerLog
      • wire

        private final Wire wire
    • Constructor Detail

      • LoggingManagedHttpClientConnection

        public LoggingManagedHttpClientConnection​(java.lang.String id,
                                                  org.apache.commons.logging.Log log,
                                                  org.apache.commons.logging.Log headerLog,
                                                  org.apache.commons.logging.Log wireLog,
                                                  int bufferSize,
                                                  int fragmentSizeHint,
                                                  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.io.HttpMessageWriterFactory<org.apache.http.HttpRequest> requestWriterFactory,
                                                  org.apache.http.io.HttpMessageParserFactory<org.apache.http.HttpResponse> responseParserFactory)
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface org.apache.http.HttpConnection
        Overrides:
        close in class org.apache.http.impl.BHttpConnectionBase
        Throws:
        java.io.IOException
      • setSocketTimeout

        public void setSocketTimeout​(int timeout)
        Specified by:
        setSocketTimeout in interface org.apache.http.HttpConnection
        Overrides:
        setSocketTimeout in class org.apache.http.impl.BHttpConnectionBase
      • shutdown

        public void shutdown()
                      throws java.io.IOException
        Specified by:
        shutdown in interface org.apache.http.HttpConnection
        Overrides:
        shutdown in class DefaultManagedHttpClientConnection
        Throws:
        java.io.IOException
      • getSocketInputStream

        protected java.io.InputStream getSocketInputStream​(java.net.Socket socket)
                                                    throws java.io.IOException
        Overrides:
        getSocketInputStream in class org.apache.http.impl.BHttpConnectionBase
        Throws:
        java.io.IOException
      • getSocketOutputStream

        protected java.io.OutputStream getSocketOutputStream​(java.net.Socket socket)
                                                      throws java.io.IOException
        Overrides:
        getSocketOutputStream in class org.apache.http.impl.BHttpConnectionBase
        Throws:
        java.io.IOException
      • onResponseReceived

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

        protected void onRequestSubmitted​(org.apache.http.HttpRequest request)
        Overrides:
        onRequestSubmitted in class org.apache.http.impl.DefaultBHttpClientConnection