@Plugin(name="Command Service Plugin", id="command-service", description="Command service utility.") public final class CommandService extends ConsolePlugin implements ConsoleService
| Constructor and Description |
|---|
CommandService() |
| Modifier and Type | Method and Description |
|---|---|
CommandTask |
execute(CommandHandle handle,
Duration timeout,
String command,
Object... args)
Sends a command to a remote subsystem using the default sender.
|
CommandSender |
getSender()
Creates a customizable instance of
CommandSender configured for use in the graphical console environment. |
void |
watch(Consumer<Boolean> watcher,
String command,
int numberOfArguments)
Not yet implemented.
Registers a component that should be notified whenever the availability of the specified command changes.
|
getConsole, getServices, initialize, propertiesChanged, restore, save, setServicesProvider, shutdown, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitstartService, stopServicepublic CommandSender getSender()
CommandSender configured for use in the graphical console environment.
For any commands sent through the CommandSender created by this method,
CommandHandle methods will be called on the AWT Event Dispatching Thread.CommandSender.public CommandTask execute(CommandHandle handle, Duration timeout, String command, Object... args)
handle - Handle for processing the command responses. May be null if no processing is required.
All callbacks are executed on the AWT Event Dispatching Thread.timeout - Timeout. If null, the default timeout of this sender will be used.
Zero means the command will never time out.
Negative timeout means its absolute value will be used and the custom timeout
suggested by the target subsystem through an ACK will be ignored regardless of
this sender settings.command - Command in subsystem/path format.args - Command arguments.public void watch(Consumer<Boolean> watcher, String command, int numberOfArguments)
watcher - Component to be notified.command - Command in subsystem/path format.numberOfArguments - Number of arguments accepted by the command.Copyright © 2018 LSST. All rights reserved.