public class CollectionResultListener<E> extends java.lang.Object implements IResultListener<E>, IUndoneResultListener<E>
| Modifier and Type | Field and Description | 
|---|---|
| protected IResultListener<java.util.Collection<E>> | delegateThe delegate result listener. | 
| protected boolean | ignorefailuresFlag to indicate that failures should be ignored and only valid results returned. | 
| protected boolean | notifiedFlag to indicate that the delegate already has been notified. | 
| protected static java.lang.Object | NULLNull object. | 
| protected int | numThe number of sub listeners to wait for. | 
| protected java.util.Collection<E> | resultsThe original result collection. | 
| protected boolean | undoneThe undone flag. | 
| Constructor and Description | 
|---|
| CollectionResultListener(boolean ignorefailes,
                        IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                        IFunctionalExceptionListener exceptionDelegate)Create a new collection listener. | 
| CollectionResultListener(boolean ignorefailures,
                        IResultListener<java.util.Collection<E>> delegate)Create a new collection listener. | 
| CollectionResultListener(IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                        IFunctionalExceptionListener exceptionDelegate)Create a new collection listener. | 
| CollectionResultListener(int num,
                        boolean ignorefailes,
                        IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                        IFunctionalExceptionListener exceptionDelegate)Create a new collection listener. | 
| CollectionResultListener(int num,
                        boolean ignorefailures,
                        IResultListener<java.util.Collection<E>> delegate)Create a new collection listener. | 
| CollectionResultListener(int num,
                        IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                        IFunctionalExceptionListener exceptionDelegate)Create a new collection listener. | 
| CollectionResultListener(int num,
                        IResultListener<java.util.Collection<E>> delegate)Create a new collection listener that stops on failures. | 
| CollectionResultListener(IResultListener<java.util.Collection<E>> delegate)Create a new collection listener that stops on failures. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | checkNotify(E result,
           java.lang.Exception ex)Check if the delegate should be notified. | 
| void | exceptionOccurred(java.lang.Exception exception)Called when an exception occurred. | 
| void | exceptionOccurredIfUndone(java.lang.Exception exception)Called when an exception occurred. | 
| int | getResultCount()Get the result count. | 
| boolean | isUndone()Get the undone. | 
| protected void | notifyDelegate(java.lang.Exception exception)Notify the delegate. | 
| void | resultAvailable(E result)Called when some result is available. | 
| void | resultAvailableIfUndone(E result)Called when the result is available. | 
| void | setNumber(int num)Set the expected number of results. | 
protected int num
protected java.util.Collection<E> results
protected IResultListener<java.util.Collection<E>> delegate
protected boolean notified
protected boolean ignorefailures
protected boolean undone
protected static final java.lang.Object NULL
public CollectionResultListener(IFunctionalResultListener<java.util.Collection<E>> resultDelegate, IFunctionalExceptionListener exceptionDelegate)
num - The expected number of results.resultDelegate - The functional delegate result listener.exceptionDelegate - The functional delegate exception listener.
        Passing null enables default exception logging.public CollectionResultListener(IResultListener<java.util.Collection<E>> delegate)
num - The expected number of results.delegate - The delegate result listener.public CollectionResultListener(boolean ignorefailes,
                                IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                                IFunctionalExceptionListener exceptionDelegate)
num - The expected number of results.ignorefailures - When set to true failures will be tolerated and
        just not be added to the result collection.resultDelegate - The functional delegate result listener.exceptionDelegate - The functional delegate exception listener.
        Passing null enables default exception logging.public CollectionResultListener(boolean ignorefailures,
                                IResultListener<java.util.Collection<E>> delegate)
num - The expected number of results.ignorefailures - When set to true failures will be 
        tolerated and just not be added to the result collection.delegate - The delegate result listener.public CollectionResultListener(int num,
                                IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                                IFunctionalExceptionListener exceptionDelegate)
num - The expected number of results.resultDelegate - The functional delegate result listener.exceptionDelegate - The functional delegate exception listener.
        Passing null enables default exception logging.public CollectionResultListener(int num,
                                IResultListener<java.util.Collection<E>> delegate)
num - The expected number of results.delegate - The delegate result listener.public CollectionResultListener(int num,
                                boolean ignorefailes,
                                IFunctionalResultListener<java.util.Collection<E>> resultDelegate,
                                IFunctionalExceptionListener exceptionDelegate)
num - The expected number of results.ignorefailures - When set to true failures will be tolerated and
        just not be added to the result collection.resultDelegate - The functional delegate result listener.exceptionDelegate - The functional delegate exception listener.
        Passing null enables default exception logging.public CollectionResultListener(int num,
                                boolean ignorefailures,
                                IResultListener<java.util.Collection<E>> delegate)
num - The expected number of results.ignorefailures - When set to true failures will be 
        tolerated and just not be added to the result collection.delegate - The delegate result listener.public void resultAvailable(E result)
resultAvailable in interface IFunctionalResultListener<E>result - The result.public void exceptionOccurred(java.lang.Exception exception)
exceptionOccurred in interface IFunctionalExceptionListenerexception - The exception.public void resultAvailableIfUndone(E result)
resultAvailableIfUndone in interface IUndoneResultListener<E>result - The result.public void exceptionOccurredIfUndone(java.lang.Exception exception)
exceptionOccurredIfUndone in interface IUndoneResultListener<E>exception - The exception.public boolean isUndone()
public int getResultCount()
public void setNumber(int num)
num - The expected number of results to set.protected boolean checkNotify(E result, java.lang.Exception ex)
protected void notifyDelegate(java.lang.Exception exception)