Modifier and Type | Class and Description |
---|---|
static class |
SshEffectorTasks.SshEffectorBody<T>
like
EffectorBody but providing conveniences when in a SoftwareProcess
(or other entity with a single machine location) |
static class |
SshEffectorTasks.SshEffectorTaskFactory<RET>
variant of
PlainSshExecTaskFactory which fulfills the EffectorTasks.EffectorTaskFactory signature so can be used directly as an impl for an effector,
also injects the machine automatically; can also be used outwith effector contexts, and machine is still injected if it is
run from inside a task at an entity with a single SshMachineLocation |
static class |
SshEffectorTasks.SshFetchEffectorTaskFactory |
static class |
SshEffectorTasks.SshPutEffectorTaskFactory |
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.lang.Boolean> |
IGNORE_ENTITY_SSH_FLAGS |
Constructor and Description |
---|
SshEffectorTasks() |
Modifier and Type | Method and Description |
---|---|
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> |
codePidFromFileRunning(java.lang.String pidFile)
task which returns 0 if pid in the given file is running;
method accepts wildcards so long as they match a single file on the remote end
|
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> |
codePidRunning(java.lang.Integer pid)
task which returns 0 if pid is running
|
static SshEffectorTasks.SshFetchEffectorTaskFactory |
fetch(java.lang.String remoteFile) |
static java.util.Map<java.lang.String,java.lang.Object> |
getSshFlags(Entity entity,
Location optionalLocation)
extracts the values for the main brooklyn.ssh.config.* config keys (i.e.
|
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Boolean> |
isPidFromFileRunning(java.lang.String pidFile)
as
codePidFromFileRunning(String) but returning boolean |
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Boolean> |
isPidRunning(java.lang.Integer pid)
as
codePidRunning(Integer) but returning boolean |
static SshPutTaskFactory |
put(java.lang.String remoteFile) |
static SshEffectorTasks.SshEffectorTaskFactory<?> |
requirePidFromFileRunning(java.lang.String pidFile)
task which fails if the pid in the given file is not running (or if there is no such PID file);
method accepts wildcards so long as they match a single file on the remote end (fails if 0 or 2+ matching files)
|
static SshEffectorTasks.SshEffectorTaskFactory<?> |
requirePidRunning(java.lang.Integer pid)
task which fails if the given PID is not running
|
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> |
ssh(java.util.List<java.lang.String> commands) |
static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> |
ssh(java.lang.String... commands) |
public static final ConfigKey<java.lang.Boolean> IGNORE_ENTITY_SSH_FLAGS
public static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> ssh(java.lang.String... commands)
public static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> ssh(java.util.List<java.lang.String> commands)
public static SshPutTaskFactory put(java.lang.String remoteFile)
public static SshEffectorTasks.SshFetchEffectorTaskFactory fetch(java.lang.String remoteFile)
public static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> codePidRunning(java.lang.Integer pid)
public static SshEffectorTasks.SshEffectorTaskFactory<?> requirePidRunning(java.lang.Integer pid)
public static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Boolean> isPidRunning(java.lang.Integer pid)
codePidRunning(Integer)
but returning booleanpublic static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Integer> codePidFromFileRunning(java.lang.String pidFile)
returns 1 if no matching file, 1 if matching file but no matching process, and 2 if 2+ matching files
public static SshEffectorTasks.SshEffectorTaskFactory<?> requirePidFromFileRunning(java.lang.String pidFile)
public static SshEffectorTasks.SshEffectorTaskFactory<java.lang.Boolean> isPidFromFileRunning(java.lang.String pidFile)
codePidFromFileRunning(String)
but returning boolean@Beta public static java.util.Map<java.lang.String,java.lang.Object> getSshFlags(Entity entity, Location optionalLocation)
currently this is computed for each call, which may be wasteful, but it is reliable in the face of config changes. we could cache the Map. note that we do _not_ cache (or even own) the SshTool; the SshTool is created or re-used by the SshMachineLocation making use of these properties