Package org.apache.commons.chain.impl
Class ChainBase
- java.lang.Object
-
- org.apache.commons.chain.impl.ChainBase
-
-
Field Summary
Fields Modifier and Type Field Description protected Command[]commandsprotected booleanfrozenFlag indicating whether the configuration of our commands list has been frozen by a call to theexecute()method.-
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCommand(Command command)See theChainJavaDoc.booleanexecute(Context context)See theChainJavaDoc.(package private) Command[]getCommands()
-
-
-
Field Detail
-
commands
protected Command[] commands
-
frozen
protected boolean frozen
Flag indicating whether the configuration of our commands list has been frozen by a call to the
execute()method.
-
-
Method Detail
-
addCommand
public void addCommand(Command command)
See theChainJavaDoc.- Specified by:
addCommandin interfaceChain- Parameters:
command- TheCommandto be added- Throws:
java.lang.IllegalArgumentException- ifcommandisnulljava.lang.IllegalStateException- if no further configuration is allowed
-
execute
public boolean execute(Context context) throws java.lang.Exception
See theChainJavaDoc.- Specified by:
executein interfaceChain- Specified by:
executein interfaceCommand- Parameters:
context- TheContextto be processed by thisChain- Returns:
trueif the processing of thisContexthas been completed, orfalseif the processing of thisContextshould be delegated to a subsequentCommandin an enclosingChain- Throws:
java.lang.Exception- if thrown by one of theCommands in thisChainbut not handled by apostprocess()method of aFilterjava.lang.IllegalArgumentException- ifcontextisnull
-
getCommands
Command[] getCommands()
-
-