net.i2p.data.i2cp

## Interface I2CPMessageReader.I2CPMessageEventListener

- All Known Implementing Classes:
    ClientMessageEventListener, I2PSessionImpl, I2PSessionImpl2, I2PSessionMuxedImpl, I2PSimpleSession, SubSession
  Enclosing class:
    I2CPMessageReader

      public static interface I2CPMessageReader.I2CPMessageEventListener

  Defines the different events the reader produces while reading the stream

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `disconnected(I2CPMessageReader reader)` Notify the listener that the stream this reader was reading was closed.
    `void` | `messageReceived(I2CPMessageReader reader, I2CPMessage message)` Notify the listener that a message has been received from the given reader
    `void` | `readError(I2CPMessageReader reader, Exception error)` Notify the listener that an exception was thrown while reading from the given reader.

- - ### Method Detail

    - #### disconnected

          void disconnected(I2CPMessageReader reader)

      Notify the listener that the stream this reader was reading was closed. For most errors, readError() will be called first, as of 0.9.41
      Parameters:
        `reader` - I2CPMessageReader to notify

    - #### messageReceived

          void messageReceived(I2CPMessageReader reader,
                               I2CPMessage message)

      Notify the listener that a message has been received from the given reader
      Parameters:
        `reader` - I2CPMessageReader to notify
        `message` - the I2CPMessage

    - #### readError

          void readError(I2CPMessageReader reader,
                         Exception error)

      Notify the listener that an exception was thrown while reading from the given reader. For most errors, disconnected() will also be called, as of 0.9.41.
      Parameters:
        `reader` - I2CPMessageReader to notify
        `error` - Exception that was thrown, non-null