Call.Base<V>, Call.ErrorHandler<V>, Call.FlatMapper<V1,V2>, Call.Mapper<V1,V2>| Modifier | Constructor and Description |
|---|---|
protected |
Base() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Requests to cancel this call, even if some implementations may not support it.
|
protected void |
doCancel() |
protected abstract void |
doEnqueue(Callback<V> callback) |
protected abstract V |
doExecute() |
protected boolean |
doIsCanceled() |
void |
enqueue(Callback<V> callback)
Invokes a request asynchronously, signaling the
callback when complete. |
V |
execute()
Invokes a request, returning a success value or propagating an error to the caller.
|
boolean |
isCanceled()
Returns true if Call.cancel() was called.
|
clone, create, emptyList, flatMap, handleError, map, propagateIfFatalpublic final V execute() throws IOException
CallEventhough this is a blocking call, implementations may honor calls to Call.cancel() from a different thread.
execute in class Call<V>V is Void.IOExceptionprotected abstract V doExecute() throws IOException
IOExceptionpublic final void enqueue(Callback<V> callback)
Callcallback when complete. Invoking this
more than once will result in an error. To repeat a call, make a copy with Call.clone().public final void cancel()
Callprotected void doCancel()
public final boolean isCanceled()
CallCalls can fail before being canceled, so true does always mean cancelation caused a call to fail. That said, successful cancellation does result in a failure.
isCanceled in class Call<V>protected boolean doIsCanceled()
Copyright © 2015–2019 OpenZipkin. All rights reserved.