Package net.i2p.data.i2cp
Class I2CPMessageReader
java.lang.Object
net.i2p.data.i2cp.I2CPMessageReader
- Direct Known Subclasses:
QueuedI2CPMessageReader
The I2CPMessageReader reads an InputStream (using
I2CPMessageHandler
) and passes out events to a registered
listener, where events are either messages being received, exceptions being
thrown, or the connection being closed. Applications should use this rather
than read from the stream themselves.- Author:
- jrandom
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Defines the different events the reader produces while reading the streamprotected class
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
For internal extension only. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.unusedvoid
Deprecated.unusedvoid
void
Instruct the reader to begin reading messages off the streamvoid
Cancel reading.
-
Field Details
-
_listener
-
_reader
-
_readerThread
-
__readerId
-
-
Constructor Details
-
I2CPMessageReader
-
I2CPMessageReader
For internal extension only. No stream.- Since:
- 0.8.3
-
-
Method Details
-
setListener
-
getListener
-
startReading
public void startReading()Instruct the reader to begin reading messages off the stream -
pauseReading
Deprecated.unusedHave the already started reader pause its reading indefinitely -
resumeReading
Deprecated.unusedResume reading after a pause -
stopReading
public void stopReading()Cancel reading.
-