@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 |
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.Launcher will
present the exception message to the user.CommandExceptionboolean isStorageRequired()
StorageStorage is required.Copyright © 2015. All rights reserved.