Class IntermediateDelegationResultListener<E>

    • Field Detail

      • undone

        protected boolean undone
        Flag if undone methods should be used.
    • 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,
                                                    boolean undone)
        Create a new listener.
        Parameters:
        future - The delegation target.
        undone - use undone methods.
    • Method Detail

      • resultAvailable

        public final void resultAvailable​(java.util.Collection<E> result)
        Called when the result is available.
        Specified by:
        resultAvailable in interface IResultListener<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 IResultListener<E>
        Parameters:
        exception - The exception.
      • customIntermediateResultAvailable

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

        public void maxResultCountAvailable​(int max)
        Declare that the future result count is available. This method is only called for intermediate futures, i.e. when this method is called it is guaranteed that the intermediateResultAvailable method will be called as often as the result count indicates.
        Specified by:
        maxResultCountAvailable in interface IIntermediateResultListener<E>
      • 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.