public class IntermediateDelegationResultListener<E> extends java.lang.Object implements IIntermediateResultListener<E>, IFutureCommandResultListener<java.util.Collection<E>>, IUndoneIntermediateResultListener<E>
Modifier and Type | Field and Description |
---|---|
protected IFunctionalIntermediateResultListener<E> |
customIntermediateResultListener
Custom functional intermediate result listener
|
protected IFunctionalResultListener<java.util.Collection<E>> |
customResultListener
Custom functional result listener
|
protected IIntermediateResultListener<E> |
delegate
Custom functional result listener
|
protected IntermediateFuture<E> |
future
The future to which calls are delegated.
|
protected boolean |
undone
Flag if undone methods should be used.
|
Constructor and Description |
---|
IntermediateDelegationResultListener(IIntermediateResultListener<E> delegate)
Create a new listener.
|
IntermediateDelegationResultListener(IIntermediateResultListener<E> delegate,
boolean undone)
Create a new listener.
|
IntermediateDelegationResultListener(IntermediateFuture<E> future)
Create a new listener.
|
IntermediateDelegationResultListener(IntermediateFuture<E> future,
boolean undone)
Create a new listener.
|
IntermediateDelegationResultListener(IntermediateFuture<E> future,
boolean undone,
IFunctionalResultListener<java.util.Collection<E>> customResultListener,
IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
Create a new listener.
|
IntermediateDelegationResultListener(IntermediateFuture<E> future,
IFunctionalResultListener<java.util.Collection<E>> customResultListener,
IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
Create a new listener.
|
Modifier and Type | Method and Description |
---|---|
void |
commandAvailable(java.lang.Object command)
Called when a command is available.
|
void |
customIntermediateResultAvailable(E result)
Called when an intermediate result is available.
|
void |
customResultAvailable(java.util.Collection<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.
|
void |
finished()
Declare that the future is finished.
|
void |
finishedIfUndone()
Declare that the future is finished.
|
protected void |
handleException(java.lang.Exception e)
Handle an exception.
|
void |
intermediateResultAvailable(E result)
Called when an intermediate result is available.
|
void |
intermediateResultAvailableIfUndone(E result)
Called when an intermediate result is available.
|
void |
resultAvailable(java.util.Collection<E> result)
Called when the result is available.
|
void |
resultAvailableIfUndone(java.util.Collection<E> result)
Called when the result is available.
|
protected IntermediateFuture<E> future
protected boolean undone
protected IIntermediateResultListener<E> delegate
protected IFunctionalResultListener<java.util.Collection<E>> customResultListener
protected IFunctionalIntermediateResultListener<E> customIntermediateResultListener
public IntermediateDelegationResultListener(IIntermediateResultListener<E> delegate)
delegate
- The delegation target.public IntermediateDelegationResultListener(IIntermediateResultListener<E> delegate, boolean undone)
delegate
- The delegation target.undone
- use undone methods.public IntermediateDelegationResultListener(IntermediateFuture<E> future)
future
- The delegation target.public IntermediateDelegationResultListener(IntermediateFuture<E> future, IFunctionalResultListener<java.util.Collection<E>> customResultListener, IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
future
- The delegation target.customResultListener
- Custom result listener that overwrites the delegation behaviour.customIntermediateResultListener
- Custom intermediate result listener that overwrites the delegation behaviour.public IntermediateDelegationResultListener(IntermediateFuture<E> future, boolean undone)
future
- The delegation target.undone
- use undone methods.public IntermediateDelegationResultListener(IntermediateFuture<E> future, boolean undone, IFunctionalResultListener<java.util.Collection<E>> customResultListener, IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
future
- The delegation target.undone
- use undone methods.customResultListener
- Custom result listener that overwrites the delegation behaviour.customIntermediateResultListener
- Custom intermediate result listener that overwrites the delegation behaviour.public final void resultAvailable(java.util.Collection<E> result)
resultAvailable
in interface IFunctionalResultListener<java.util.Collection<E>>
result
- The result.public final void intermediateResultAvailable(E result)
intermediateResultAvailable
in interface IFunctionalIntermediateResultListener<E>
intermediateResultAvailable
in interface IIntermediateResultListener<E>
result
- The result.public void finished()
finished
in interface IFunctionalIntermediateFinishedListener<E>
finished
in interface IIntermediateResultListener<E>
public void customResultAvailable(java.util.Collection<E> result)
result
- The result.public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred
in interface IFunctionalExceptionListener
exception
- The exception.public void customIntermediateResultAvailable(E result)
result
- The result.public void commandAvailable(java.lang.Object command)
commandAvailable
in interface IFutureCommandResultListener<java.util.Collection<E>>
public void resultAvailableIfUndone(java.util.Collection<E> result)
resultAvailableIfUndone
in interface IUndoneResultListener<java.util.Collection<E>>
result
- The result.public void exceptionOccurredIfUndone(java.lang.Exception exception)
exceptionOccurredIfUndone
in interface IUndoneResultListener<java.util.Collection<E>>
exception
- The exception.public void intermediateResultAvailableIfUndone(E result)
intermediateResultAvailableIfUndone
in interface IUndoneIntermediateResultListener<E>
result
- The result.public void finishedIfUndone()
finishedIfUndone
in interface IUndoneIntermediateResultListener<E>
protected void handleException(java.lang.Exception e)