Class IntermediateDelegationResultListener<E>

    • Constructor Detail

      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IIntermediateResultListener<E> delegate)
        Create a new listener.
        Parameters:
        delegate - The delegation target.
      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IIntermediateResultListener<E> delegate,
                                                    boolean undone)
        Create a new listener.
        Parameters:
        delegate - The delegation target.
        undone - use undone methods.
      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IntermediateFuture<E> future)
        Create a new listener.
        Parameters:
        future - The delegation target.
      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IntermediateFuture<E> future,
                                                    IFunctionalResultListener<java.util.Collection<E>> customResultListener,
                                                    IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
        Create a new listener.
        Parameters:
        future - The delegation target.
        customResultListener - Custom result listener that overwrites the delegation behaviour.
        customIntermediateResultListener - Custom intermediate result listener that overwrites the delegation behaviour.
      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IntermediateFuture<E> future,
                                                    boolean undone)
        Create a new listener.
        Parameters:
        future - The delegation target.
        undone - use undone methods.
      • IntermediateDelegationResultListener

        public IntermediateDelegationResultListener​(IntermediateFuture<E> future,
                                                    boolean undone,
                                                    IFunctionalResultListener<java.util.Collection<E>> customResultListener,
                                                    IFunctionalIntermediateResultListener<E> customIntermediateResultListener)
        Create a new listener.
        Parameters:
        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.
    • Method Detail

      • resultAvailable

        public final void resultAvailable​(java.util.Collection<E> result)
        Called when the result is available.
        Specified by:
        resultAvailable in interface IFunctionalResultListener<E>
        Parameters:
        result - The result.
      • customResultAvailable

        public void customResultAvailable​(java.util.Collection<E> result)
        Called when the result is available.
        Parameters:
        result - The result.
      • exceptionOccurred

        public void exceptionOccurred​(java.lang.Exception exception)
        Called when an exception occurred.
        Specified by:
        exceptionOccurred in interface IFunctionalExceptionListener
        Parameters:
        exception - The exception.
      • customIntermediateResultAvailable

        public void customIntermediateResultAvailable​(E result)
        Called when an intermediate result is available.
        Parameters:
        result - The result.
      • resultAvailableIfUndone

        public void resultAvailableIfUndone​(java.util.Collection<E> result)
        Called when the result is available.
        Specified by:
        resultAvailableIfUndone in interface IUndoneResultListener<E>
        Parameters:
        result - The result.
      • exceptionOccurredIfUndone

        public void exceptionOccurredIfUndone​(java.lang.Exception exception)
        Called when an exception occurred.
        Specified by:
        exceptionOccurredIfUndone in interface IUndoneResultListener<E>
        Parameters:
        exception - The exception.
      • finishedIfUndone

        public void finishedIfUndone()
        Declare that the future is finished. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method was called for all intermediate results before.
        Specified by:
        finishedIfUndone in interface IUndoneIntermediateResultListener<E>
      • handleException

        protected void handleException​(java.lang.Exception e)
        Handle an exception.