| Modifier and Type | Field and Description |
|---|---|
protected Command[] |
commands
|
protected boolean |
frozen
Flag indicating whether the configuration of our commands list
has been frozen by a call to the
execute() method. |
CONTINUE_PROCESSING, PROCESSING_COMPLETE| Constructor and Description |
|---|
ChainBase()
|
ChainBase(Collection commands)
|
ChainBase(Command command)
|
ChainBase(Command[] commands)
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCommand(Command command)
See the
Chain JavaDoc. |
boolean |
execute(Context context)
See the
Chain JavaDoc. |
protected Command[] commands
protected boolean frozen
Flag indicating whether the configuration of our commands list
has been frozen by a call to the execute() method.
public ChainBase()
public ChainBase(Command command)
command - The Command to be configuredIllegalArgumentException - if command
is nullpublic ChainBase(Command[] commands)
commands - The Commands to be configuredIllegalArgumentException - if commands,
or one of the individual Command elements,
is nullpublic ChainBase(Collection commands)
commands - The Commands to be configuredIllegalArgumentException - if commands,
or one of the individual Command elements,
is nullpublic void addCommand(Command command)
Chain JavaDoc.addCommand in interface Chaincommand - The Command to be addedIllegalArgumentException - if command
is nullIllegalStateException - if no further configuration is allowedpublic boolean execute(Context context) throws Exception
Chain JavaDoc.execute in interface Chainexecute in interface Commandcontext - The Context to be processed by this
Chaintrue if the processing of this Context
has been completed, or false if the processing
of this Context should be delegated to a subsequent
Command in an enclosing ChainException - if thrown by one of the Commands
in this Chain but not handled by a postprocess()
method of a FilterIllegalArgumentException - if context
is nullCopyright © 2003–2022 The Apache Software Foundation. All rights reserved.