org.apache.logging.log4j.core.appender.rolling.helper
Class CompositeAction

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.rolling.helper.AbstractAction
      extended by org.apache.logging.log4j.core.appender.rolling.helper.CompositeAction
All Implemented Interfaces:
Runnable, Action

public class CompositeAction
extends AbstractAction

A group of Actions to be executed in sequence.


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.appender.rolling.helper.AbstractAction
LOGGER
 
Constructor Summary
CompositeAction(List<Action> actions, boolean stopOnError)
          Construct a new composite action.
 
Method Summary
 boolean execute()
          Execute sequence of actions.
 void run()
          
 
Methods inherited from class org.apache.logging.log4j.core.appender.rolling.helper.AbstractAction
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(List<Action> 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 Runnable
Overrides:
run in class AbstractAction

execute

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

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


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.