com.ibm.btt.command
Class CommandChain<T,T1,E extends java.lang.Exception>
java.lang.Object
com.ibm.btt.command.CommandChain<T,T1,E>
- All Implemented Interfaces:
- Command<T,T1,E>
public class CommandChain<T,T1,E extends java.lang.Exception>
- extends java.lang.Object
- implements Command<T,T1,E>
The class is a command implememtation of chain of responsbilities
Method Summary |
T1 |
execute(T context)
If return true, faces the including chain to be terminated, if return
false, the including chain will continue. |
java.util.List<Command<T,T1,E>> |
getCommands()
return the command list |
void |
setCommands(java.util.List<Command<T,T1,E>> steps)
set the command list |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
commands
protected java.util.List<Command<T,T1,E extends java.lang.Exception>> commands
CommandChain
public CommandChain()
execute
public T1 execute(T context)
throws E extends java.lang.Exception
- Description copied from interface:
Command
- If return true, faces the including chain to be terminated, if return
false, the including chain will continue.
- Specified by:
execute
in interface Command<T,T1,E extends java.lang.Exception>
- Returns:
-
- Throws:
E extends java.lang.Exception
getCommands
public java.util.List<Command<T,T1,E>> getCommands()
- return the command list
- Returns:
- List>
setCommands
public void setCommands(java.util.List<Command<T,T1,E>> steps)
- set the command list
- Parameters:
steps
-
(c) Copyright IBM Corporation 1998, 2009