org.x4juli.handlers.rolling.helper
Class CompositeAction

java.lang.Object
  extended byorg.x4juli.global.components.AbstractComponent
      extended byorg.x4juli.handlers.rolling.helper.AbstractAction
          extended byorg.x4juli.handlers.rolling.helper.CompositeAction
All Implemented Interfaces:
Action, Component, java.lang.Runnable

public class CompositeAction
extends AbstractAction

A group of Actions to be executed in sequence.

Logging API as a whole was originally done for Apache log4j. Juli is a port of main parts of that to complete the Java Logging APIs. All credits for initial idea, design, implementation, documentation belong to the log4j crew. This file was originally published by Curt Arnold. Please use exclusively the appropriate mailing lists for questions, remarks and contribution.

Since:
0.5
Author:
Boris Unckel

Field Summary
private  Action[] actions
          Actions to perform.
private  boolean stopOnError
          Stop on error.
 
Fields inherited from class org.x4juli.handlers.rolling.helper.AbstractAction
 
Fields inherited from class org.x4juli.global.components.AbstractComponent
manager, repository
 
Constructor Summary
CompositeAction(java.util.List actions, boolean stopOnError)
          Construct a new composite action.
 
Method Summary
 boolean execute()
          Perform action.
 void run()
          
 
Methods inherited from class org.x4juli.handlers.rolling.helper.AbstractAction
close, isComplete, reportException
 
Methods inherited from class org.x4juli.global.components.AbstractComponent
getLogger, getLoggerRepository, getMessageProperties, getNonFloodingLogger, getProperty, getProperty, getProperty, getProperty, resetErrorCount, setObjectStore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actions

private final Action[] actions
Actions to perform.


stopOnError

private final boolean stopOnError
Stop on error.

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 AbstractAction

execute

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

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


${license_html}