Class AbstractAction

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean complete
      Is action complete.
      private boolean interrupted
      Is action interrupted.
      protected static Logger LOGGER
      Allows subclasses access to the status logger without creating another instance.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractAction()
      Constructor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Cancels the action if not already initialized or waits till completion.
      abstract boolean execute()
      Performs action.
      boolean isComplete()
      Tests if the action is complete.
      boolean isInterrupted()  
      protected void reportException​(java.lang.Exception ex)
      Captures exception.
      void run()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
        Allows subclasses access to the status logger without creating another instance.
      • complete

        private boolean complete
        Is action complete.
      • interrupted

        private boolean interrupted
        Is action interrupted.
    • Constructor Detail

      • AbstractAction

        protected AbstractAction()
        Constructor.
    • Method Detail

      • execute

        public abstract boolean execute()
                                 throws java.io.IOException
        Performs action.
        Specified by:
        execute in interface Action
        Returns:
        true if successful.
        Throws:
        java.io.IOException - if IO error.
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • close

        public void close()
        Cancels the action if not already initialized or waits till completion.
        Specified by:
        close in interface Action
      • isComplete

        public boolean isComplete()
        Tests if the action is complete.
        Specified by:
        isComplete in interface Action
        Returns:
        true if action is complete.
      • isInterrupted

        public boolean isInterrupted()
      • reportException

        protected void reportException​(java.lang.Exception ex)
        Captures exception.
        Parameters:
        ex - exception.