private class HttpReceiverOverHTTP2.ContentNotifier extends IteratingCallback implements Retainable
IteratingCallback.Action
Callback.Completable, Callback.Completing, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private HttpReceiverOverHTTP2.DataInfo |
dataInfo |
private java.util.Queue<HttpReceiverOverHTTP2.DataInfo> |
queue |
__nonBlocking
Modifier | Constructor and Description |
---|---|
private |
ContentNotifier() |
Modifier and Type | Method and Description |
---|---|
private void |
offer(HttpReceiverOverHTTP2.DataInfo dataInfo) |
protected void |
onCompleteFailure(java.lang.Throwable failure)
Invoked when the overall task has completed with a failure.
|
protected void |
onCompleteSuccess()
Invoked when the overall task has completed successfully.
|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
boolean |
reset()
Resets this callback.
|
void |
retain() |
close, failed, isClosed, isFailed, isSucceeded, iterate, succeeded, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInvocationType, getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private final java.util.Queue<HttpReceiverOverHTTP2.DataInfo> queue
private HttpReceiverOverHTTP2.DataInfo dataInfo
private void offer(HttpReceiverOverHTTP2.DataInfo dataInfo)
protected IteratingCallback.Action process()
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
public void retain()
retain
in interface Retainable
protected void onCompleteSuccess()
IteratingCallback
onCompleteSuccess
in class IteratingCallback
IteratingCallback.onCompleteFailure(Throwable)
protected void onCompleteFailure(java.lang.Throwable failure)
IteratingCallback
onCompleteFailure
in class IteratingCallback
failure
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
public boolean reset()
IteratingCallback
A callback can only be reset to IDLE from the SUCCEEDED or FAILED states or if it is already IDLE.
reset
in class IteratingCallback