Class ActionHandler

  • All Implemented Interfaces:
    IHandler, IHandler2

    public final class ActionHandler
    extends AbstractHandler

    This class adapts instances of IAction to IHandler.

    Since:
    3.1
    • Constructor Detail

      • ActionHandler

        public ActionHandler​(IAction action)
        Creates a new instance of this class given an instance of IAction.
        Parameters:
        action - the action. Must not be null.
    • Method Detail

      • addHandlerListener

        public final void addHandlerListener​(IHandlerListener handlerListener)
        Description copied from interface: IHandler
        Registers an instance of IHandlerListener to listen for changes to properties of this instance.
        Specified by:
        addHandlerListener in interface IHandler
        Overrides:
        addHandlerListener in class AbstractHandler
        Parameters:
        handlerListener - the instance to register. Must not be null. If an attempt is made to register an instance which is already registered with this instance, no operation is performed.
      • execute

        public final Object execute​(ExecutionEvent event)
                             throws ExecutionException
        Description copied from interface: IHandler
        Executes with the map of parameter values by name.
        Parameters:
        event - An event containing all the information about the current state of the application; must not be null.
        Returns:
        the result of the execution. Reserved for future use, must be null.
        Throws:
        ExecutionException - if an exception occurred during execution.
      • getAction

        public final IAction getAction()
        Returns the action associated with this handler
        Returns:
        the action associated with this handler (not null)
        Since:
        3.1
      • isHandled

        public final boolean isHandled()
        Description copied from class: AbstractHandler
        Whether this handler is capable of handling delegated responsibilities at this time. Subclasses may override this method.
        Specified by:
        isHandled in interface IHandler
        Overrides:
        isHandled in class AbstractHandler
        Returns:
        true
      • removeHandlerListener

        public final void removeHandlerListener​(IHandlerListener handlerListener)
        Description copied from interface: IHandler
        Unregisters an instance of IHandlerListener listening for changes to properties of this instance.
        Specified by:
        removeHandlerListener in interface IHandler
        Overrides:
        removeHandlerListener in class AbstractHandler
        Parameters:
        handlerListener - the instance to unregister. Must not be null. If an attempt is made to unregister an instance which is not already registered with this instance, no operation is performed.