public class SwingDelegationResultListener<E>
extends java.lang.Object
implements jadex.commons.future.IUndoneResultListener<E>, jadex.commons.future.IFutureCommandResultListener<E>
Modifier and Type | Field and Description |
---|---|
protected jadex.commons.future.IFunctionalExceptionListener |
customExceptionListener
Custom result listener
|
protected jadex.commons.future.IFunctionalResultListener<E> |
customResultListener
Custom result listener
|
protected jadex.commons.future.Future<E> |
future
The future to which calls are delegated.
|
protected boolean |
undone
Flag if undone methods should be used.
|
Constructor and Description |
---|
SwingDelegationResultListener(jadex.commons.future.Future<E> future)
Create a new listener.
|
SwingDelegationResultListener(jadex.commons.future.Future<E> fut,
jadex.commons.future.IFunctionalResultListener<E> customResultListener)
Create a new listener with functional interfaces.
|
SwingDelegationResultListener(jadex.commons.future.Future<E> fut,
jadex.commons.future.IFunctionalResultListener<E> customResultListener,
jadex.commons.future.IFunctionalExceptionListener customExceptionListener)
Create a new listener with functional interfaces.
|
Modifier and Type | Method and Description |
---|---|
void |
commandAvailable(java.lang.Object command)
Called when a command is available.
|
void |
customCommandAvailable(java.lang.Object command)
Called when a command is available.
|
void |
customExceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.
|
void |
customResultAvailable(E result)
Called when the result is available.
|
void |
exceptionOccurred(java.lang.Exception exception)
Called when an exception occurred.
|
void |
exceptionOccurredIfUndone(java.lang.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.
|
protected jadex.commons.future.Future<E> future
protected boolean undone
protected jadex.commons.future.IFunctionalResultListener<E> customResultListener
protected jadex.commons.future.IFunctionalExceptionListener customExceptionListener
public SwingDelegationResultListener(jadex.commons.future.Future<E> fut, jadex.commons.future.IFunctionalResultListener<E> customResultListener)
fut
- The Delegate.customResultListener
- The listener.public SwingDelegationResultListener(jadex.commons.future.Future<E> fut, jadex.commons.future.IFunctionalResultListener<E> customResultListener, jadex.commons.future.IFunctionalExceptionListener customExceptionListener)
fut
- The Delegate.customResultListener
- The custom result listener.customExceptionListener
- The listener that is called on exceptions.public SwingDelegationResultListener(jadex.commons.future.Future<E> future)
public final void resultAvailable(E result)
resultAvailable
in interface jadex.commons.future.IFunctionalResultListener<E>
result
- The result.public final void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred
in interface jadex.commons.future.IFunctionalExceptionListener
exception
- The exception.public void customResultAvailable(E result)
result
- The result.public void customExceptionOccurred(java.lang.Exception exception)
exception
- The exception.public final void commandAvailable(java.lang.Object command)
commandAvailable
in interface jadex.commons.future.IFutureCommandListener
public void customCommandAvailable(java.lang.Object command)
public void resultAvailableIfUndone(E result)
resultAvailableIfUndone
in interface jadex.commons.future.IUndoneResultListener<E>
result
- The result.public void exceptionOccurredIfUndone(java.lang.Exception exception)
exceptionOccurredIfUndone
in interface jadex.commons.future.IUndoneResultListener<E>
exception
- The exception.public boolean isUndone()