Package org.apache.log4j.rolling.helper
Class ActionBase
- java.lang.Object
-
- org.apache.log4j.rolling.helper.ActionBase
-
- All Implemented Interfaces:
java.lang.Runnable
,Action
- Direct Known Subclasses:
CompositeAction
,FileRenameAction
,GZCompressAction
,ZipCompressAction
public abstract class ActionBase extends java.lang.Object implements Action
Abstract base class for implementations of Action.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
complete
Is action complete.private boolean
interrupted
Is action interrupted.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ActionBase()
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()
Perform action.boolean
isComplete()
Tests if the action is complete.protected void
reportException(java.lang.Exception ex)
Capture exception.void
run()
-
-
-
Method Detail
-
execute
public abstract boolean execute() throws java.io.IOException
Perform action.
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
close
public void close()
Cancels the action if not already initialized or waits till completion.
-
isComplete
public boolean isComplete()
Tests if the action is complete.- Specified by:
isComplete
in interfaceAction
- Returns:
- true if action is complete.
-
reportException
protected void reportException(java.lang.Exception ex)
Capture exception.- Parameters:
ex
- exception.
-
-