T - A type T to return as resultpublic class AsyncResultImpl<T> extends Object implements IAsyncResult<T>
| Modifier and Type | Method and Description |
|---|---|
static <T> AsyncResultImpl<T> |
create(T result)
Convenience method for creating an async result.
|
static <T> AsyncResultImpl<T> |
create(Throwable t)
Convenience method for creating an async result.
|
static <T> AsyncResultImpl<T> |
create(Throwable t,
Class<T> type)
Convenience method for creating an async result.
|
Throwable |
getError()
Any unhandled exception raised during the course of execution.
|
T |
getResult()
Contains the async call if it succeeded, otherwise null.
|
boolean |
isError()
Whether the call failed.
|
boolean |
isSuccess()
Whether the call was successful.
|
public static final <T> AsyncResultImpl<T> create(T result)
result - the resultpublic static final <T> AsyncResultImpl<T> create(Throwable t)
t - the throwablepublic static final <T> AsyncResultImpl<T> create(Throwable t, Class<T> type)
t - the throwabletype - the typepublic boolean isSuccess()
IAsyncResultisSuccess in interface IAsyncResult<T>IAsyncResult.isSuccess()public boolean isError()
IAsyncResultisError in interface IAsyncResult<T>IAsyncResult.isError()public T getResult()
IAsyncResultgetResult in interface IAsyncResult<T>IAsyncResult.getResult()public Throwable getError()
IAsyncResultgetError in interface IAsyncResult<T>IAsyncResult.getError()Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.