java.lang.Object
org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
All Implemented Interfaces:
Runnable, Action
Direct Known Subclasses:
AbstractPathAction, CommonsCompressAction, CompositeAction, FileRenameAction, GzCompressAction, ZipCompressAction

public abstract class AbstractAction extends Object implements Action
Abstract base class for implementations of Action.
  • Field Details

    • LOGGER

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

    • AbstractAction

      protected AbstractAction()
      Constructor.
  • Method Details

    • execute

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

      public void run()
      Specified by:
      run in interface 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(Exception ex)
      Captures exception.
      Parameters:
      ex - exception.