public static interface ConnectionObserver.ReadObserver
Either readComplete()
or readFailed(Throwable)
will be invoked to signal when a read operation
terminates. readCancelled()
is also a terminal signal for the read operation, however it may be invoked
concurrently with readComplete()
or readFailed(Throwable)
.
Modifier and Type | Method and Description |
---|---|
void |
itemRead()
Invokes when a new item is read.
|
void |
readCancelled()
Callback when the read operation is cancelled.
|
void |
readComplete()
Callback when the entire read operation completes successfully.
|
void |
readFailed(java.lang.Throwable cause)
Callback when the read operation fails with an
error . |
void |
requestedToRead(long n)
Callback when new items are requested to read.
|
void requestedToRead(long n)
n
- number of requested items to readvoid itemRead()
Content of the read items should be inspected at the higher level API when these items are consumed.
void readFailed(java.lang.Throwable cause)
error
.cause
- Throwable
that terminated the readvoid readComplete()
void readCancelled()