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

java.lang.Object
  extended by org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
      extended by org.apache.logging.log4j.core.appender.rolling.action.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.action.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()
          
 String toString()
           
 
Methods inherited from class org.apache.logging.log4j.core.appender.rolling.action.AbstractAction
close, isComplete, reportException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.