Class AbstractAction
- java.lang.Object
-
- org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
-
- All Implemented Interfaces:
java.lang.Runnable,Action
- Direct Known Subclasses:
AbstractPathAction,CommonsCompressAction,CompositeAction,FileRenameAction,GzCompressAction,RollingFileManager.AsyncAction,ZipCompressAction
public abstract class AbstractAction extends java.lang.Object implements Action
Abstract base class for implementations of Action.
-
-
Field Summary
Fields Modifier and Type Field Description private booleancompleteIs action complete.private booleaninterruptedIs action interrupted.protected static LoggerLOGGERAllows subclasses access to the status logger without creating another instance.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractAction()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Cancels the action if not already initialized or waits till completion.abstract booleanexecute()Performs action.booleanisComplete()Tests if the action is complete.booleanisInterrupted()protected voidreportException(java.lang.Exception ex)Captures exception.voidrun()
-
-
-
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.
-
-
Method Detail
-
execute
public abstract boolean execute() throws java.io.IOExceptionPerforms action.
-
run
public void run()
- Specified by:
runin 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:
isCompletein interfaceAction- Returns:
- true if action is complete.
-
isInterrupted
public boolean isInterrupted()
-
reportException
protected void reportException(java.lang.Exception ex)
Captures exception.- Parameters:
ex- exception.
-
-