Class ChainBase
java.lang.Object
org.apache.commons.chain.impl.ChainBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Command[]protected booleanFlag indicating whether the configuration of our commands list has been frozen by a call to theexecute()method.Fields inherited from interface Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(Command command) See theChainJavaDoc.booleanSee theChainJavaDoc.(package private) Command[]
-
Field Details
-
commands
-
frozen
protected boolean frozenFlag indicating whether the configuration of our commands list has been frozen by a call to the
execute()method.
-
-
Constructor Details
-
ChainBase
-
ChainBase
- Parameters:
command- TheCommandto be configured- Throws:
IllegalArgumentException- ifcommandisnull
-
ChainBase
-
ChainBase
- Parameters:
commands- TheCommands to be configured- Throws:
IllegalArgumentException- ifcommands, or one of the individualCommandelements, isnull
-
-
Method Details
-
addCommand
See theChainJavaDoc.- Specified by:
addCommandin interfaceChain- Parameters:
command- TheCommandto be added- Throws:
IllegalArgumentException- ifcommandisnullIllegalStateException- if no further configuration is allowed
-
execute
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:
Exception- if thrown by one of theCommands in thisChainbut not handled by apostprocess()method of aFilterIllegalArgumentException- ifcontextisnull
-
getCommands
-