Brooklyn

brooklyn.entity.software
[Java] Class SshEffectorTasks

java.lang.Object
  brooklyn.entity.software.SshEffectorTasks

@Beta
public class SshEffectorTasks

convenience classes and methods for working with SshTasks, where the SshMachineLocation is inferred either from the effector generation or the context task

Since:
0.6.0


Nested Class Summary
static class SshEffectorTasks.SshEffectorBody

like EffectorBody but providing conveniences when in a SoftwareProcess (or other entity with a single machine location)

static class SshEffectorTasks.SshEffectorTaskFactory

variant of PlainSshExecTaskFactory which fulfills the 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

 
Method Summary
static SshEffectorTasks.SshEffectorTaskFactory 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 codePidRunning(java.lang.Integer pid)

task which returns 0 if pid is running

static SshEffectorTasks.SshFetchEffectorTaskFactory fetch(java.lang.String remoteFile)

static SshEffectorTasks.SshEffectorTaskFactory isPidFromFileRunning(java.lang.String pidFile)

as codePidFromFileRunning(String) but returning boolean

static SshEffectorTasks.SshEffectorTaskFactory isPidRunning(java.lang.Integer pid)

as codePidRunning(String) 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 ssh(java.lang.String... commands)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

codePidFromFileRunning

public static SshEffectorTasks.SshEffectorTaskFactory 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

returns 1 if no matching file, 1 if matching file but no matching process, and 2 if 2+ matching files


codePidRunning

public static SshEffectorTasks.SshEffectorTaskFactory codePidRunning(java.lang.Integer pid)
task which returns 0 if pid is running


fetch

public static SshEffectorTasks.SshFetchEffectorTaskFactory fetch(java.lang.String remoteFile)


isPidFromFileRunning

public static SshEffectorTasks.SshEffectorTaskFactory isPidFromFileRunning(java.lang.String pidFile)
as codePidFromFileRunning(String) but returning boolean


isPidRunning

public static SshEffectorTasks.SshEffectorTaskFactory isPidRunning(java.lang.Integer pid)
as codePidRunning(String) but returning boolean


put

public static SshPutTaskFactory put(java.lang.String remoteFile)


requirePidFromFileRunning

public 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)


requirePidRunning

public static SshEffectorTasks.SshEffectorTaskFactory requirePidRunning(java.lang.Integer pid)
task which fails if the given PID is not running


ssh

public static SshEffectorTasks.SshEffectorTaskFactory ssh(java.lang.String... commands)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.