public interface AsyncResult<T>
waitForResult()), polled (getResult() and
getError()), or listened to setListener(ResultListener).
AsyncResult can be used from any thread and from multiple-thread.AsyncResultImpl| Modifier and Type | Interface and Description |
|---|---|
static class |
AsyncResult.AsyncResultStatus |
| Modifier and Type | Method and Description |
|---|---|
ServiceResultException |
getError()
getError.
|
T |
getResult()
Get result if available
|
AsyncResult.AsyncResultStatus |
getStatus()
Get request status
|
void |
setListener(ResultListener<T> listener)
Set a listener.
|
T |
waitForResult()
Wait for result until result is available.
|
T |
waitForResult(long timeout,
TimeUnit unit)
Wait for result or time out.
|
ServiceResultException getError()
getError.
ServiceResultException object.T getResult() throws ServiceResultException
ServiceResultException - if errorAsyncResult.AsyncResultStatus getStatus()
void setListener(ResultListener<T> listener)
listener - (listener may not block) or null to remove listenerT waitForResult() throws ServiceResultException
ServiceResultException - network error, e.g. IOException of
MethodNotSupportedExceptionT waitForResult(long timeout, TimeUnit unit) throws ServiceResultException
timeout - time out valueunit - time unitServiceResultException - error during invocationCopyright © 2026. All rights reserved.