public final class SshCommandSensor<T> extends AbstractAddSensorFeed<T>
EntityInitializer which adds an SSH sensor feed running the command supplied
in order to populate the sensor with the indicated name. Note that the targetType is ignored,
and always set to String.HttpRequestSensor| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<java.lang.String> |
SENSOR_COMMAND |
static ConfigKey<java.lang.String> |
SENSOR_EXECUTION_DIR |
static MapConfigKey<java.lang.Object> |
SENSOR_SHELL_ENVIRONMENT |
static ConfigKey<java.lang.Object> |
VALUE_ON_ERROR |
LOG_WARNING_GRACE_TIME, LOG_WARNING_GRACE_TIME_ON_STARTUP, SUPPRESS_DUPLICATESSENSOR_NAME, SENSOR_PERIOD, SENSOR_TYPE| Constructor and Description |
|---|
SshCommandSensor(ConfigBag params) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(EntityLocal entity)
Applies initialization logic to a just-built entity.
|
static java.lang.String |
makeCommandExecutingInDirectory(java.lang.String command,
java.lang.String executionDir,
Entity entity) |
public static final ConfigKey<java.lang.String> SENSOR_COMMAND
public static final ConfigKey<java.lang.String> SENSOR_EXECUTION_DIR
public static final ConfigKey<java.lang.Object> VALUE_ON_ERROR
public static final MapConfigKey<java.lang.Object> SENSOR_SHELL_ENVIRONMENT
public SshCommandSensor(ConfigBag params)
public void apply(EntityLocal entity)
EntityInitializerapply in interface EntityInitializerapply in class AddSensor<T>entity - guaranteed to be the actual implementation instance,
thus guaranteed to be castable to EntityInternal which is often desired,
or to the type at hand (it is not even a proxy)public static java.lang.String makeCommandExecutingInDirectory(java.lang.String command,
java.lang.String executionDir,
Entity entity)