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, propagateIfFatal
public final V execute() throws IOException
Call
Eventhough this is a blocking call, implementations may honor calls to Call.cancel() from a different thread.
execute
in class Call<V>
V
is Void.IOException
protected abstract V doExecute() throws IOException
IOException
public final void enqueue(Callback<V> callback)
Call
callback
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()
Call
protected void doCancel()
public final boolean isCanceled()
Call
Calls 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–2018 OpenZipkin. All rights reserved.