private class HttpConnection.SendCallback extends IteratingCallback
IteratingCallback.Action
Callback.Completable, Callback.Nested
Invocable.InvocationType
Modifier and Type | Field and Description |
---|---|
private Callback |
_callback |
private java.nio.ByteBuffer |
_content |
private boolean |
_head |
private java.nio.ByteBuffer |
_header |
private MetaData.Response |
_info |
private boolean |
_lastContent |
private boolean |
_shutdownOut |
__nonBlocking
Modifier | Constructor and Description |
---|---|
private |
SendCallback() |
Modifier and Type | Method and Description |
---|---|
Invocable.InvocationType |
getInvocationType() |
void |
onCompleteFailure(java.lang.Throwable x)
Invoked when the overall task has completed with a failure.
|
protected void |
onCompleteSuccess()
Invoked when the overall task has completed successfully.
|
IteratingCallback.Action |
process()
Method called by
IteratingCallback.iterate() to process the sub task. |
private void |
releaseHeader() |
private boolean |
reset(MetaData.Response info,
boolean head,
java.nio.ByteBuffer content,
boolean last,
Callback callback) |
java.lang.String |
toString() |
close, failed, isClosed, isFailed, isSucceeded, iterate, reset, succeeded
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInvocationType, invokeNonBlocking, isNonBlockingInvocation
private MetaData.Response _info
private boolean _head
private java.nio.ByteBuffer _content
private boolean _lastContent
private Callback _callback
private java.nio.ByteBuffer _header
private boolean _shutdownOut
public Invocable.InvocationType getInvocationType()
private boolean reset(MetaData.Response info, boolean head, java.nio.ByteBuffer content, boolean last, Callback callback)
public 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
private void releaseHeader()
protected void onCompleteSuccess()
IteratingCallback
onCompleteSuccess
in class IteratingCallback
IteratingCallback.onCompleteFailure(Throwable)
public void onCompleteFailure(java.lang.Throwable x)
IteratingCallback
onCompleteFailure
in class IteratingCallback
x
- the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()
public java.lang.String toString()
toString
in class IteratingCallback