Package 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
Modifier 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 readervoidreadError(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() 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() will be called first, as of 0.9.41- Parameters:
reader- I2CPMessageReader to notify
-