Class DelegationResultListener<E>

    • Field Detail

      • future

        protected Future<E> future
        The future to which calls are delegated.
      • undone

        protected boolean undone
        Flag if undone methods should be used.
    • Constructor Detail

      • DelegationResultListener

        public DelegationResultListener​(Future<E> future)
        Create a new listener.
      • DelegationResultListener

        public DelegationResultListener​(Future<E> future,
                                        IFunctionalResultListener<E> customResultListener)
        Create a new listener.
        Parameters:
        future - The delegation target.
        customResultListener - Custom result listener that overwrites the delegation behaviour.
      • DelegationResultListener

        public DelegationResultListener​(Future<E> future,
                                        boolean undone,
                                        IFunctionalResultListener<E> customResultListener)
        Create a new listener.
        Parameters:
        future - The delegation target.
        undone - use undone methods.
        customResultListener - Custom result listener that overwrites the delegation behaviour.
      • DelegationResultListener

        public DelegationResultListener​(Future<E> future,
                                        boolean undone)
        Create a new listener.
    • Method Detail

      • resultAvailable

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

        public void customResultAvailable​(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.
      • exceptionOccurredIfUndone

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

        public boolean isUndone()
        Get the undone.
        Returns:
        The undone.