Class LoggingBHttpClientConnection

    • Field Detail

      • COUNT

        private static final java.util.concurrent.atomic.AtomicLong COUNT
      • id

        private final java.lang.String id
      • log

        private final org.slf4j.Logger log
      • headerLog

        private final org.slf4j.Logger headerLog
      • wire

        private final Wire wire
    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in interface Identifiable
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: HttpConnection
        Closes this connection gracefully. This method will attempt to flush the internal output buffer prior to closing the underlying socket. This method MUST NOT be called from a different thread to force shutdown of the connection. Use shutdown instead.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface HttpConnection
        Overrides:
        close in class BHttpConnectionBase
        Throws:
        java.io.IOException
      • close

        public void close​(CloseMode closeMode)
        Description copied from interface: ModalCloseable
        Closes this process or endpoint and releases any system resources associated with it. If the endpoint or the process is already closed then invoking this method has no effect.
        Specified by:
        close in interface ModalCloseable
        Overrides:
        close in class BHttpConnectionBase
        Parameters:
        closeMode - How to close the receiver.
      • bind

        public void bind​(java.net.Socket socket)
                  throws java.io.IOException
        Description copied from class: BHttpConnectionBase
        Binds this connection to the given Socket. This socket will be used by the connection to send and receive data.

        After this method's execution the connection status will be reported as open and the BHttpConnectionBase.isOpen() will return true.

        Overrides:
        bind in class DefaultBHttpClientConnection
        Parameters:
        socket - the socket.
        Throws:
        java.io.IOException - in case of an I/O error.