public static final class NoopTransportObserver.NoopReadObserver extends java.lang.Object implements ConnectionObserver.ReadObserver
ConnectionObserver.ReadObserver
.Modifier and Type | Field and Description |
---|---|
static ConnectionObserver.ReadObserver |
INSTANCE |
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.
|
public static final ConnectionObserver.ReadObserver INSTANCE
public void requestedToRead(long n)
ConnectionObserver.ReadObserver
requestedToRead
in interface ConnectionObserver.ReadObserver
n
- number of requested items to readpublic void itemRead()
ConnectionObserver.ReadObserver
Content of the read items should be inspected at the higher level API when these items are consumed.
itemRead
in interface ConnectionObserver.ReadObserver
public void readFailed(java.lang.Throwable cause)
ConnectionObserver.ReadObserver
error
.readFailed
in interface ConnectionObserver.ReadObserver
cause
- Throwable
that terminated the readpublic void readComplete()
ConnectionObserver.ReadObserver
readComplete
in interface ConnectionObserver.ReadObserver
public void readCancelled()
ConnectionObserver.ReadObserver
readCancelled
in interface ConnectionObserver.ReadObserver