Class TargetHandler

  • All Implemented Interfaces:
    org.apache.http.nio.NHttpClientEventHandler

    public class TargetHandler
    extends Object
    implements org.apache.http.nio.NHttpClientEventHandler
    This class is handling events from the transport -- > client.
    • Method Detail

      • connected

        public void connected​(org.apache.http.nio.NHttpClientConnection conn,
                              Object o)
        Specified by:
        connected in interface org.apache.http.nio.NHttpClientEventHandler
      • requestReady

        public void requestReady​(org.apache.http.nio.NHttpClientConnection conn)
        Specified by:
        requestReady in interface org.apache.http.nio.NHttpClientEventHandler
      • outputReady

        public void outputReady​(org.apache.http.nio.NHttpClientConnection conn,
                                org.apache.http.nio.ContentEncoder encoder)
        Specified by:
        outputReady in interface org.apache.http.nio.NHttpClientEventHandler
      • responseReceived

        public void responseReceived​(org.apache.http.nio.NHttpClientConnection conn)
        Specified by:
        responseReceived in interface org.apache.http.nio.NHttpClientEventHandler
      • inputReady

        public void inputReady​(org.apache.http.nio.NHttpClientConnection conn,
                               org.apache.http.nio.ContentDecoder decoder)
        Specified by:
        inputReady in interface org.apache.http.nio.NHttpClientEventHandler
      • closed

        public void closed​(org.apache.http.nio.NHttpClientConnection conn)
        Specified by:
        closed in interface org.apache.http.nio.NHttpClientEventHandler
      • timeout

        public void timeout​(org.apache.http.nio.NHttpClientConnection conn)
        Specified by:
        timeout in interface org.apache.http.nio.NHttpClientEventHandler
      • endOfInput

        public void endOfInput​(org.apache.http.nio.NHttpClientConnection conn)
                        throws IOException
        Invoked when the backend terminates the outbound HTTP connection unexpectedly. Logs diagnostics, marks the connection CLOSED, shuts it down, and routes the error to the standard fault handler.
        Specified by:
        endOfInput in interface org.apache.http.nio.NHttpClientEventHandler
        Parameters:
        conn - the target NHttpClientConnection that ended input
        Throws:
        IOException - if an error occurs while closing the connection
      • exception

        public void exception​(org.apache.http.nio.NHttpClientConnection conn,
                              Exception ex)
        Specified by:
        exception in interface org.apache.http.nio.NHttpClientEventHandler