private class HttpConnection.SendCallback extends IteratingCallback
IteratingCallback.ActionCallback.Completable, Callback.NestedInvocable.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, succeededclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInvocationType, invokeNonBlocking, isNonBlockingInvocationprivate 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
IteratingCallbackIteratingCallback.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 IteratingCallbackjava.lang.Exceptionprivate void releaseHeader()
protected void onCompleteSuccess()
IteratingCallbackonCompleteSuccess in class IteratingCallbackIteratingCallback.onCompleteFailure(Throwable)public void onCompleteFailure(java.lang.Throwable x)
IteratingCallbackonCompleteFailure in class IteratingCallbackx - the throwable to indicate cause of failureIteratingCallback.onCompleteSuccess()public java.lang.String toString()
toString in class IteratingCallback