Class AbstractAction
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
-
- Direct Known Subclasses:
AbstractPathAction
,CommonsCompressAction
,CompositeAction
,FileRenameAction
,GzCompressAction
,ZipCompressAction
public abstract class AbstractAction extends Object implements Action
Abstract base class for implementations of Action.
-
-
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(Exception ex)
Captures exception.void
run()
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
Allows subclasses access to the status logger without creating another instance.
-
-
Method Detail
-
execute
public abstract boolean execute() throws IOException
Performs action.- Specified by:
execute
in interfaceAction
- Returns:
- true if successful.
- Throws:
IOException
- if IO error.
-
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.
-
isInterrupted
public boolean isInterrupted()
-
reportException
protected void reportException(Exception ex)
Captures exception.- Parameters:
ex
- exception.
-
-