- 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 MethodsModifier and TypeMethodDescriptionvoiddisconnected(I2CPMessageReader reader) Notify the listener that the stream this reader was reading was closed.voidmessageReceived(I2CPMessageReader reader, I2CPMessage message) Notify the listener that a message has been received from the given reader.voidreadError(I2CPMessageReader reader, Exception error) Notify the listener that an exception was thrown while reading from the given reader.
Method Details
messageReceived
Notify the listener that a message has been received from the given reader.- Parameters:
reader- I2CPMessageReader to notifymessage- the I2CPMessage
readError
Notify the listener that an exception was thrown while reading from the given reader. For most errors,disconnected(I2CPMessageReader)will also be called, as of 0.9.41.- Parameters:
reader- I2CPMessageReader to notifyerror- Exception that was thrown, non-null
disconnected
Notify the listener that the stream this reader was reading was closed. For most errors,readError(I2CPMessageReader, Exception)will be called first, as of 0.9.41.- Parameters:
reader- I2CPMessageReader to notify