public class HTTP2Flusher extends IteratingCallback
Modifier and Type | Class and Description |
---|---|
static class |
HTTP2Flusher.Entry |
IteratingCallback.Action
Callback.Adapter, Callback.Nested, Callback.NonBlocking
Constructor and Description |
---|
HTTP2Flusher(HTTP2Session session) |
Modifier and Type | Method and Description |
---|---|
boolean |
append(HTTP2Flusher.Entry entry) |
int |
getQueueSize() |
protected void |
onCompleteFailure(Throwable x)
Invoked when the overall task has completed with a failure.
|
protected void |
onCompleteSuccess()
Invoked when the overall task has completed successfully.
|
boolean |
prepend(HTTP2Flusher.Entry entry) |
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
void |
succeeded()
Invoked when the sub task succeeds.
|
void |
window(IStream stream,
WindowUpdateFrame frame) |
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isNonBlocking
public HTTP2Flusher(HTTP2Session session)
public void window(IStream stream, WindowUpdateFrame frame)
public boolean prepend(HTTP2Flusher.Entry entry)
public boolean append(HTTP2Flusher.Entry entry)
public int getQueueSize()
protected IteratingCallback.Action process() throws 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
Exception
- if the sub task processing throwspublic void succeeded()
IteratingCallback
super.succeeded()
.succeeded
in interface Callback
succeeded
in class IteratingCallback
Callback.failed(Throwable)
protected void onCompleteSuccess()
IteratingCallback
onCompleteSuccess
in class IteratingCallback
IteratingCallback.onCompleteFailure(Throwable)
protected void onCompleteFailure(Throwable x)
IteratingCallback
onCompleteFailure
in class IteratingCallback
x
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
Copyright © 1995-2016 Webtide. All Rights Reserved.