public class AsyncCallbackFuture<T> extends AsyncCallback<T> implements java.util.concurrent.Future<T>
Constructor and Description |
---|
AsyncCallbackFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
this implementation doesn't support canceling, so it will always return false.
|
T |
get() |
T |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
void |
onError(java.lang.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)
cancel
in interface java.util.concurrent.Future<T>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<T>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<T>
public T get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<T>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<T>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.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(java.lang.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 error