Package org.mwolff.command.process
Interface ProcessCommand<T>
-
- All Superinterfaces:
ChainCommand<T>
,Command<T>
- All Known Subinterfaces:
CommandContainer<T>
- All Known Implementing Classes:
AbstractDefaultProcessCommand
,DefaultCommandContainer
,DefaultEndCommand
,InjectionChainBuilder
,XMLChainBuilder
public interface ProcessCommand<T> extends ChainCommand<T>
Command interface for the command framework. Commands may act with generic command contexts.- Author:
- Manfred Wolff
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
addTransition(Transition transition)
Optional<String>
executeAsProcess(String startCommand, T context)
Execute a command as a process.Optional<String>
executeAsProcess(T context)
Execute a command as a process.default Optional<String>
findNext(String next)
Finds the next command with the processID next.String
getProcessID()
Gets the process ID of the command.default List<Transition>
getTransitionList()
void
setProcessID(String processID)
Sets the process ID of the command-
Methods inherited from interface org.mwolff.command.chain.ChainCommand
executeCommandAsChain
-
Methods inherited from interface org.mwolff.command.Command
executeCommand
-
-
-
-
Field Detail
-
END
static final String END
- See Also:
- Constant Field Values
-
-
Method Detail
-
addTransition
default void addTransition(Transition transition)
-
executeAsProcess
Optional<String> executeAsProcess(String startCommand, T context)
Execute a command as a process. The result is the decision which process step should be executed next.- Parameters:
startCommand
- The command the process should start with.context
- The context to work with.- Returns:
- The next process step to execute. Null stops the process.
-
executeAsProcess
Optional<String> executeAsProcess(T context)
Execute a command as a process. The result is the decision which process step should be executed next.- Parameters:
context
- The context to work with.- Returns:
- The next process step to execute. Null stops the process.
-
findNext
default Optional<String> findNext(String next)
Finds the next command with the processID next.- Parameters:
next
- The process id to find.- Returns:
- The process id of the next command
-
getProcessID
String getProcessID()
Gets the process ID of the command.- Returns:
- The process ID
-
getTransitionList
default List<Transition> getTransitionList()
-
setProcessID
void setProcessID(String processID)
Sets the process ID of the command- Parameters:
processID
- Sets the process id of this process command.
-
-