T
- type of the operation result; for void
type, use
java.lang.Void
public abstract class AsyncCallback<T>
extends java.lang.Object
Multiple progress updates can arrive for an operation. Note that progress updates might be delivered after the result. For example consider client with an application thread pool - the thread that delivers a progress update might be scheduled before the thread that delivers the result.
Thread-safety: The implementation must be thread-safe. The methods of the callback might be invoked on different threads (for example consider client with an I/O reactor thread pool and/or an application thread pool).
Constructor and Description |
---|
AsyncCallback() |
Modifier and Type | Method and Description |
---|---|
abstract void |
onError(java.lang.RuntimeException error)
Completes the invocation with an error.
|
abstract void |
onProgress(Progress progress)
Reports progress for the operation invocation.
|
abstract void |
onResult(T result)
Completes the invocation with a result object.
|
public abstract void onProgress(Progress progress)
progress
- progress status of the operation invocationpublic abstract void onResult(T result)
result
- operation resultpublic abstract void onError(java.lang.RuntimeException error)
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.error
- operation error