@Beta
public class EffectorTasks
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EffectorTasks.EffectorBodyTaskFactory<T>
wrapper for
EffectorBody which simply runs that body on each invocation;
the body must be thread safe and ideally stateless |
static interface |
EffectorTasks.EffectorTaskFactory<T> |
static class |
EffectorTasks.ParameterTask<T> |
| Constructor and Description |
|---|
EffectorTasks() |
| Modifier and Type | Method and Description |
|---|---|
static <T> ConfigKey<T> |
asConfigKey(ParameterType<T> t) |
static Entity |
findEntity()
Finds the entity where this task is running
|
static <T extends Entity> |
findEntity(java.lang.Class<T> type)
Finds the entity where this task is running, casted to the given Entity subtype
|
static SshMachineLocation |
findSshMachine()
Finds a unique
SshMachineLocation attached to the entity
where this task is running |
static SshMachineLocation |
getSshMachine(Entity entity)
Finds a unique
SshMachineLocation attached to the supplied entity |
static WinRmMachineLocation |
getWinRmMachine(Entity entity)
Finds a unique
WinRmMachineLocation attached to the supplied entity |
static <T> EffectorTasks.EffectorTaskFactory<T> |
of(Task<T> task) |
static <T> EffectorTasks.ParameterTask<T> |
parameter(java.lang.Class<T> type,
java.lang.String name) |
static <T> EffectorTasks.ParameterTask<T> |
parameter(ConfigKey<T> p) |
static <T> EffectorTasks.ParameterTask<T> |
parameter(ParameterType<T> t) |
public static <T> ConfigKey<T> asConfigKey(ParameterType<T> t)
public static <T> EffectorTasks.ParameterTask<T> parameter(ParameterType<T> t)
public static <T> EffectorTasks.ParameterTask<T> parameter(java.lang.Class<T> type, java.lang.String name)
public static <T> EffectorTasks.ParameterTask<T> parameter(ConfigKey<T> p)
public static <T> EffectorTasks.EffectorTaskFactory<T> of(Task<T> task)
public static Entity findEntity()
java.lang.NullPointerException - if there is none (no task, or no context entity for that task)public static <T extends Entity> T findEntity(java.lang.Class<T> type)
java.lang.NullPointerException - if there is nonejava.lang.IllegalArgumentException - if it is not of the indicated typepublic static SshMachineLocation findSshMachine()
SshMachineLocation attached to the entity
where this task is runningjava.lang.NullPointerException - if findEntity() failsjava.lang.IllegalStateException - if call to getSshMachine(Entity) failspublic static SshMachineLocation getSshMachine(Entity entity)
SshMachineLocation attached to the supplied entityjava.lang.IllegalStateException - if there is not a unique such SshMachineLocationpublic static WinRmMachineLocation getWinRmMachine(Entity entity)
WinRmMachineLocation attached to the supplied entityjava.lang.IllegalStateException - if there is not a unique such WinRmMachineLocation