public interface ExecutionStrategy
This interface is used to enable a Shell
to execute methods in a consistent, system-wide
manner. A typical use case is to ensure user interface commands are not executed concurrently
when other background threads are performing certain operations.
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.
|
Object execute(ParseResult parseResult) throws RuntimeException
ParseResult
.parseResult
- that should be executed (never presented as null)Shell
implementation (may return null)RuntimeException
- which is handled by the Shell
implementationboolean isReadyForCommands()
void terminate()