org.apache.log4j.rolling.helper
Class ActionBase

java.lang.Object
  extended by 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.

Author:
Curt Arnold

Constructor Summary
protected ActionBase()
          Constructor.
 
Method Summary
 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()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionBase

protected ActionBase()
Constructor.

Method Detail

execute

public abstract boolean execute()
                         throws java.io.IOException
Perform action.

Specified by:
execute in interface Action
Returns:
true if successful.
Throws:
java.io.IOException - if IO error.

run

public void run()

Specified by:
run in interface java.lang.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(java.lang.Exception ex)
Capture exception.

Parameters:
ex - exception.


Copyright © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras Companion for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.