private class HttpOutput.AsyncWrite extends HttpOutput.AsyncICB
IteratingCallback.Action
Callback.Completable, Callback.Completing, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private java.nio.ByteBuffer |
_buffer |
protected boolean |
_completed |
private int |
_len |
private java.nio.ByteBuffer |
_slice |
_last
__nonBlocking
Constructor and Description |
---|
AsyncWrite(byte[] b,
int off,
int len,
boolean last) |
AsyncWrite(java.nio.ByteBuffer buffer,
boolean last) |
Modifier and Type | Method and Description |
---|---|
protected IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
getInvocationType, onCompleteFailure, onCompleteSuccess
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, succeeded, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private final java.nio.ByteBuffer _buffer
private final java.nio.ByteBuffer _slice
private final int _len
protected volatile boolean _completed
public AsyncWrite(byte[] b, int off, int len, boolean last)
public AsyncWrite(java.nio.ByteBuffer buffer, boolean last)
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