public class ExceptionDelegationResultListener<E,T> extends Object implements IResultListener<E>, IFutureCommandListener, IUndoneResultListener<E>
| Constructor and Description |
|---|
ExceptionDelegationResultListener(Future<T> future)
Create a new listener.
|
ExceptionDelegationResultListener(Future<T> future,
boolean undone)
Create a new listener.
|
ExceptionDelegationResultListener(Future<T> future,
boolean undone,
IFunctionalResultListener<E> customResultListener)
Create a new listener.
|
ExceptionDelegationResultListener(Future<T> future,
IFunctionalResultListener<E> customResultListener)
Create a new listener.
|
| Modifier and Type | Method and Description |
|---|---|
void |
commandAvailable(Object command)
Called when a command is available.
|
void |
customResultAvailable(E result)
Called when the result is available.
|
void |
exceptionOccurred(Exception exception)
Called when an exception occurred.
|
void |
exceptionOccurredIfUndone(Exception exception)
Called when an exception occurred.
|
boolean |
isUndone()
Get the undone.
|
void |
resultAvailable(E result)
Called when the result is available.
|
void |
resultAvailableIfUndone(E result)
Called when the result is available.
|
public ExceptionDelegationResultListener(Future<T> future)
public ExceptionDelegationResultListener(Future<T> future, IFunctionalResultListener<E> customResultListener)
future - The delegation target.customResultListener - Custom result listener that handles the
result.public ExceptionDelegationResultListener(Future<T> future, boolean undone, IFunctionalResultListener<E> customResultListener)
future - The delegation target.undone - use undone methods.customResultListener - Custom result listener that handles the
result.public final void resultAvailable(E result)
resultAvailable in interface IFunctionalResultListener<E>result - The result.public void customResultAvailable(E result) throws Exception
result - The result.Exceptionpublic void exceptionOccurred(Exception exception)
exceptionOccurred in interface IFunctionalExceptionListenerexception - The exception.public void resultAvailableIfUndone(E result)
resultAvailableIfUndone in interface IUndoneResultListener<E>result - The result.public void exceptionOccurredIfUndone(Exception exception)
exceptionOccurredIfUndone in interface IUndoneResultListener<E>exception - The exception.public boolean isUndone()
public void commandAvailable(Object command)
commandAvailable in interface IFutureCommandListenerCopyright © 2015. All Rights Reserved.