## net.i2p.data.i2np
Interface I2NPMessageReader.I2NPMessageEventListener

All Known Implementing Classes:
  MessageHandler

Enclosing class:
  I2NPMessageReader

    public static interface I2NPMessageReader.I2NPMessageEventListener

Defines the different events the reader produces while reading the stream

Method Summary
`void` `disconnected(I2NPMessageReader reader)` Notify the listener that the stream the given reader was running off closed
`void` `messageReceived(I2NPMessageReader reader, I2NPMessage message, long msToRead, int bytesRead)` Notify the listener that a message has been received from the given reader
`void` `readError(I2NPMessageReader reader, java.lang.Exception error)` Notify the listener that an exception was thrown while reading from the given reader

Method Detail

### messageReceived

    void messageReceived(I2NPMessageReader reader,
                         I2NPMessage message,
                         long msToRead,
                         int bytesRead)

  Notify the listener that a message has been received from the given reader

### readError

    void readError(I2NPMessageReader reader,
                   java.lang.Exception error)

  Notify the listener that an exception was thrown while reading from the given reader

### disconnected

    void disconnected(I2NPMessageReader reader)

  Notify the listener that the stream the given reader was running off closed