Class SwingDefaultResultListener<E>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.function.Consumer<java.lang.Exception> customExceptionListener
      Custom result listener
      protected java.util.function.Consumer<E> customResultListener
      Custom result listener
      protected java.awt.Component parent
      The component.
    • Constructor Summary

      Constructors 
      Constructor Description
      SwingDefaultResultListener()
      Create a new listener.
      SwingDefaultResultListener​(java.awt.Component parent)
      Create a new listener.
      SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener)
      Create a new listener with functional interfaces.
      SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener, java.util.function.Consumer<java.lang.Exception> customExceptionListener)
      Create a new listener with functional interfaces.
      SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener, java.util.function.Consumer<java.lang.Exception> customExceptionListener, java.awt.Component parent)
      Create a new listener with functional interfaces.
      SwingDefaultResultListener​(java.util.logging.Logger logger)
      Create a new listener.
    • Field Detail

      • parent

        protected java.awt.Component parent
        The component.
      • customResultListener

        protected java.util.function.Consumer<E> customResultListener
        Custom result listener
      • customExceptionListener

        protected java.util.function.Consumer<java.lang.Exception> customExceptionListener
        Custom result listener
    • Constructor Detail

      • SwingDefaultResultListener

        public SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener)
        Create a new listener with functional interfaces.
        Parameters:
        listener - The listener.
      • SwingDefaultResultListener

        public SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener,
                                          java.util.function.Consumer<java.lang.Exception> customExceptionListener)
        Create a new listener with functional interfaces.
        Parameters:
        customResultListener - The custom result listener.
        customExceptionListener - The listener that is called on exceptions.
      • SwingDefaultResultListener

        public SwingDefaultResultListener​(java.util.function.Consumer<E> customResultListener,
                                          java.util.function.Consumer<java.lang.Exception> customExceptionListener,
                                          java.awt.Component parent)
        Create a new listener with functional interfaces.
        Parameters:
        customResultListener - The custom result listener.
        customExceptionListener - The listener that is called on exceptions.
        parent - The parent component (when errors should be shown as dialog).
      • SwingDefaultResultListener

        public SwingDefaultResultListener()
        Create a new listener.
      • SwingDefaultResultListener

        public SwingDefaultResultListener​(java.awt.Component parent)
        Create a new listener.
        Parameters:
        parent - The parent component (when errors should be shown as dialog).
      • SwingDefaultResultListener

        public SwingDefaultResultListener​(java.util.logging.Logger logger)
        Create a new listener.
        Parameters:
        logger - The logger.
    • Method Detail

      • unblock

        protected static void unblock​(Future<java.lang.Void> adblock)
      • resultAvailable

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

        public void customResultAvailable​(E result)
        Called when the result is available.
        Parameters:
        result - The result.
      • customExceptionOccurred

        public void customExceptionOccurred​(java.lang.Exception exception)
        Called when an exception occurred.
        Parameters:
        exception - The exception.
      • customCommandAvailable

        public void customCommandAvailable​(java.lang.Object command)
        Called when a command is available.