Class ActionBase

java.lang.Object
org.apache.log4j.rolling.helper.ActionBase
All Implemented Interfaces:
Runnable, Action
Direct Known Subclasses:
CompositeAction, FileRenameAction, GZCompressAction, ZipCompressAction

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

    • complete

      private boolean complete
      Is action complete.
    • interrupted

      private boolean interrupted
      Is action interrupted.
  • Constructor Details

    • ActionBase

      protected ActionBase()
      Constructor.
  • Method Details

    • execute

      public abstract boolean execute() throws IOException
      Perform 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.
    • reportException

      protected void reportException(Exception ex)
      Capture exception.
      Parameters:
      ex - exception.