private class GzipHttpOutputInterceptor.GzipBufferCB extends IteratingNestedCallback
IteratingCallback.Action
Callback.Completable, Callback.Completing, Callback.InvocableCallback, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
_content |
private java.nio.ByteBuffer |
_copy |
private boolean |
_last |
__nonBlocking
Constructor and Description |
---|
GzipBufferCB(java.nio.ByteBuffer content,
boolean complete,
Callback callback) |
Modifier and Type | Method and Description |
---|---|
protected void |
onCompleteFailure(java.lang.Throwable x)
Invoked when the overall task has completed with a failure.
|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
java.lang.String |
toString() |
getInvocationType, onCompleteSuccess
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, succeeded
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
combine, from, from, from, from, from, from
combine, getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private java.nio.ByteBuffer _copy
private final java.nio.ByteBuffer _content
private final boolean _last
public GzipBufferCB(java.nio.ByteBuffer content, boolean complete, Callback callback)
protected void onCompleteFailure(java.lang.Throwable x)
IteratingCallback
onCompleteFailure
in class IteratingNestedCallback
x
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
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 java.lang.String toString()
toString
in class IteratingNestedCallback