public class SimpleExecutionStrategy extends Object implements ExecutionStrategy
CommandMarker
s for aop-like behavior (
typically used for controlling stateful objects).Constructor and Description |
---|
SimpleExecutionStrategy() |
Modifier and Type | Method and Description |
---|---|
Object |
execute(ParseResult parseResult)
Executes the method indicated by the
ParseResult . |
boolean |
isReadyForCommands()
Indicates commands are able to be presented.
|
void |
terminate()
Indicates the execution runtime should be terminated.
|
public Object execute(ParseResult parseResult) throws RuntimeException
ExecutionStrategy
ParseResult
.execute
in interface ExecutionStrategy
parseResult
- that should be executed (never presented as null)Shell
implementation (may return null)RuntimeException
- which is handled by the Shell
implementationpublic boolean isReadyForCommands()
ExecutionStrategy
isReadyForCommands
in interface ExecutionStrategy
public void terminate()
ExecutionStrategy
terminate
in interface ExecutionStrategy