@ExtensionPoint public interface Command
In order to be runnable, a command must be registered as an OSGi service
with the NAME set to the name of the command.
It is also possible to use an instance of CommandRegistry, registering the
Commands when the bundle starts and and unregistering them when the
bundle stops.
Most Command implementations will want to choose one of the AbstractCommand
or AbstractStateNotifyingCommand classes to descend from, as they provide
sensible default implementations of most methods and/or provide some other functionality.
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailableInShell()
Whether the command is available to be invoked from within the shell.
|
boolean |
isAvailableOutsideShell()
Indicates if the command is available to be invoked from outside the
shell (as an argument to the main thermostat program).
|
boolean |
isStorageRequired()
Whether the command depends on
Storage |
void |
run(CommandContext ctx)
Execute the command.
|
static final String NAME
void run(CommandContext ctx) throws CommandException
com.redhat.thermostat.launcher.Launcher will
present the exception message to the user.CommandExceptionboolean isStorageRequired()
StorageStorage is required.boolean isAvailableInShell()
boolean isAvailableOutsideShell()
Copyright © 2013. All Rights Reserved.