private class ResponseNotifier.ContentCallback extends IteratingNestedCallback
IteratingCallback.Action
Callback.Completable, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
buffer |
private int |
index |
private java.util.List<Response.ResponseListener> |
listeners |
private Response |
response |
__nonBlocking
Modifier | Constructor and Description |
---|---|
private |
ContentCallback(java.util.List<Response.ResponseListener> listeners,
Response response,
java.nio.ByteBuffer buffer,
Callback callback) |
Modifier and Type | Method and Description |
---|---|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
void |
succeeded()
Invoked when the sub task succeeds.
|
getInvocationType, onCompleteFailure, onCompleteSuccess, toString
close, failed, isClosed, isFailed, isSucceeded, iterate, reset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private final java.util.List<Response.ResponseListener> listeners
private final Response response
private final java.nio.ByteBuffer buffer
private int index
private ContentCallback(java.util.List<Response.ResponseListener> listeners, Response response, java.nio.ByteBuffer buffer, Callback callback)
protected IteratingCallback.Action process() throws java.lang.Exception
IteratingCallback
IteratingCallback.iterate()
to process the sub task.
Implementations must start the asynchronous execution of the sub task (if any) and return an appropriate action:
IteratingCallback.Action.IDLE
when no sub tasks are available for execution
but the overall job is not completed yetIteratingCallback.Action.SCHEDULED
when the sub task asynchronous execution
has been startedIteratingCallback.Action.SUCCEEDED
when the overall job is completedprocess
in class IteratingCallback
java.lang.Exception
public void succeeded()
IteratingCallback
super.succeeded()
.succeeded
in interface Callback
succeeded
in class IteratingCallback
Callback.failed(Throwable)