Save This Page
Home » commons-chain-1.2-src » org.apache.commons » chain » impl » [javadoc | source]
org.apache.commons.chain.impl
public class: ChainBase [javadoc | source]
java.lang.Object
   org.apache.commons.chain.impl.ChainBase

All Implemented Interfaces:
    Chain

Direct Known Subclasses:
    TestChain

Convenience base class for Chain implementations.

Field Summary
protected  Command[] commands   

The list of Command s configured for this Chain , in the order in which they may delegate processing to the remainder of the Chain .

 
protected  boolean frozen   

Flag indicating whether the configuration of our commands list has been frozen by a call to the execute() method.

 
Constructor:
 public ChainBase() 
 public ChainBase(Command command) 
    Parameters:
    command - The Command to be configured
    Throws:
    IllegalArgumentException - if command is null
    exception: IllegalArgumentException - if command is null
 public ChainBase(Command[] commands) 
    Parameters:
    commands - The Command s to be configured
    Throws:
    IllegalArgumentException - if commands, or one of the individual Command elements, is null
    exception: IllegalArgumentException - if commands, or one of the individual Command elements, is null
 public ChainBase(Collection commands) 
    Parameters:
    commands - The Command s to be configured
    Throws:
    IllegalArgumentException - if commands, or one of the individual Command elements, is null
    exception: IllegalArgumentException - if commands, or one of the individual Command elements, is null
Method from org.apache.commons.chain.impl.ChainBase Summary:
addCommand,   execute,   getCommands
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.chain.impl.ChainBase Detail:
 public  void addCommand(Command command) 
 public boolean execute(Context context) throws Exception 
 Command[] getCommands() 

    Return an array of the configured Command s for this Chain . This method is package private, and is used only for the unit tests.