org.apache.hc.core5.reactor

## Interface IOEventHandler

- All Known Subinterfaces:
    HttpConnectionEventHandler
  All Known Implementing Classes:
    ClientH2IOEventHandler, ClientH2PrefaceHandler, ClientHttp1IOEventHandler, HttpProtocolNegotiator, ServerH2IOEventHandler, ServerH2PrefaceHandler, ServerHttp1IOEventHandler

      @Internal
      public interface IOEventHandler

  IOEventHandler interface is used by I/O reactors to handle I/O events for individual I/O sessions. All methods of this interface are executed on a single dispatch thread of the I/O reactor. Therefore, it is important that event processing does not not block the I/O dispatch thread for too long, thus making the I/O reactor unable to react to other events.
  Since:
    5.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connected(IOSession session)` Triggered after the given session has been just created.
    `void` | `disconnected(IOSession session)` Triggered when the given session has been terminated.
    `void` | `exception(IOSession session, Exception cause)` Triggered when the given session throws a exception.
    `void` | `inputReady(IOSession session, ByteBuffer src)` Triggered when the given session has input pending.
    `void` | `outputReady(IOSession session)` Triggered when the given session is ready for output.
    `void` | `timeout(IOSession session, Timeout timeout)` Triggered when the given session has timed out.

- - ### Method Detail

    - #### connected

          void connected(IOSession session)
                  throws IOException

      Triggered after the given session has been just created.
      Parameters:
        `session` - the I/O session.
      Throws:
        `IOException` - in case of an I/O error.

    - #### inputReady

          void inputReady(IOSession session,
                          ByteBuffer src)
                   throws IOException

      Triggered when the given session has input pending.
      Parameters:
        `session` - the I/O session.
      Throws:
        `IOException` - in case of an I/O error.

    - #### outputReady

          void outputReady(IOSession session)
                    throws IOException

      Triggered when the given session is ready for output.
      Parameters:
        `session` - the I/O session.
      Throws:
        `IOException` - in case of an I/O error.

    - #### timeout

          void timeout(IOSession session,
                       Timeout timeout)
                throws IOException

      Triggered when the given session has timed out.
      Parameters:
        `session` - the I/O session.
        `timeout` - the timeout.
      Throws:
        `IOException` - in case of an I/O error.

    - #### exception

          void exception(IOSession session,
                         Exception cause)

      Triggered when the given session throws a exception.
      Parameters:
        `session` - the I/O session.

    - #### disconnected

          void disconnected(IOSession session)

      Triggered when the given session has been terminated.
      Parameters:
        `session` - the I/O session.

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.