
public class CommandExecutor extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CommandExecutor.CommandFailedException |
static interface |
CommandExecutor.RunnableWithException |
| Constructor and Description |
|---|
CommandExecutor(org.lsst.ccs.Agent subsys) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
action(Callable<T> callable)
Executes the specified callable.
|
void |
action(CommandExecutor.RunnableWithException runnable) |
CommandExecutor |
precondition(boolean ok)
A simple precondition.
|
CommandExecutor |
precondition(boolean ok,
String reason,
Object... args)
A precondition with a reason.
|
public CommandExecutor precondition(boolean ok)
ok - If false command will not proceedpublic CommandExecutor precondition(boolean ok, String reason, Object... args)
ok - If false command will not proceedreason - The reason to use if precondition is not metargs - If present then reason is interpreted as a format string, and args
are substituted into the formatpublic <T> T action(Callable<T> callable)
T - The return type of the callablecallable - The callable to callpublic void action(CommandExecutor.RunnableWithException runnable)
Copyright © 2018 LSST. All rights reserved.