org.apache.log4j.rolling.helper
Class CompositeAction

java.lang.Object
  extended by org.apache.log4j.rolling.helper.ActionBase
      extended by org.apache.log4j.rolling.helper.CompositeAction
All Implemented Interfaces:
java.lang.Runnable, Action

public class CompositeAction
extends ActionBase

A group of Actions to be executed in sequence.

Author:
Curt Arnold

Constructor Summary
CompositeAction(java.util.List actions, boolean stopOnError)
          Construct a new composite action.
 
Method Summary
 boolean execute()
          Execute sequence of actions.
 void run()
          
 
Methods inherited from class org.apache.log4j.rolling.helper.ActionBase
close, isComplete, reportException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeAction

public CompositeAction(java.util.List actions,
                       boolean stopOnError)
Construct a new composite action.

Parameters:
actions - list of actions, may not be null.
stopOnError - if true, stop on the first false return value or exception.
Method Detail

run

public void run()

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class ActionBase

execute

public boolean execute()
                throws java.io.IOException
Execute sequence of actions.

Specified by:
execute in interface Action
Specified by:
execute in class ActionBase
Returns:
true if all actions were successful.
Throws:
java.io.IOException - on IO error.


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.