public class AsyncCallbackFuture<T> extends AsyncCallback<T> implements Future<T>
Constructor and Description |
---|
AsyncCallbackFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
onError(RuntimeException error)
Completes the invocation with an error.
|
void |
onProgress(Progress progress)
Reports progress for the operation invocation.
|
void |
onResult(T result)
Completes the invocation with a result object.
|
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>
public T get() throws InterruptedException, ExecutionException
get
in interface Future<T>
InterruptedException
ExecutionException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public void onProgress(Progress progress)
AsyncCallback
onProgress
in class AsyncCallback<T>
progress
- progress status of the operation invocationpublic void onResult(T result)
AsyncCallback
onResult
in class AsyncCallback<T>
result
- operation resultpublic void onError(RuntimeException error)
AsyncCallback
Error
) coming from the provider;
UnresolvedError
if the client bindings do not recognize the vAPI
error from the provider; ClientException
if the client-side
runtime reports an error (e.g. network failure) or some other unchecked
exception like IllegalArgumentException
if an internal problem
occurs in the client-side runtime.onError
in class AsyncCallback<T>
error
- operation errorCopyright © 2015. All Rights Reserved.