public interface IFuture<E>
| Modifier and Type | Field and Description |
|---|---|
static IFuture<Void> |
DONE
A future representing a completed action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResultListener(IFunctionalResultListener<E> listener)
Add an functional result listener, which is only called on success.
|
void |
addResultListener(IFunctionalResultListener<E> sucListener,
IFunctionalExceptionListener exListener)
Add a result listener by combining an OnSuccessListener and an
OnExceptionListener.
|
void |
addResultListener(IResultListener<E> listener)
Add a result listener.
|
E |
get()
Get the result - blocking call.
|
E |
get(ISuspendable caller)
Get the result - blocking call.
|
E |
get(ISuspendable caller,
long timeout)
Get the result - blocking call.
|
E |
get(long timeout)
Get the result - blocking call.
|
Exception |
getException()
Get the exception, if any.
|
boolean |
isDone()
Test if done, i.e.
|
boolean isDone()
Exception getException()
E get(ISuspendable caller)
E get(ISuspendable caller, long timeout)
timeout - The timeout in millis.E get()
E get(long timeout)
timeout - The timeout in millis.void addResultListener(IResultListener<E> listener)
listener - The listener.void addResultListener(IFunctionalResultListener<E> listener)
listener - The listener.void addResultListener(IFunctionalResultListener<E> sucListener, IFunctionalExceptionListener exListener)
sucListener - The listener that is called on success.exListener - The listener that is called on exceptions. Passing
null enables default exception logging.Copyright © 2015. All Rights Reserved.