public final class WinRmCommandSensor<T> extends AbstractAddSensorFeed<T>
EntityInitializer which adds an WinRm 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.
NB!! Consider using small length for command and rundir.HttpRequestSensor| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<java.lang.String> |
SENSOR_COMMAND |
static ConfigKey<java.util.Map<java.lang.String,java.lang.String>> |
SENSOR_ENVIRONMENT |
static ConfigKey<java.lang.String> |
SENSOR_EXECUTION_DIR |
LOG_WARNING_GRACE_TIME, LOG_WARNING_GRACE_TIME_ON_STARTUP, SUPPRESS_DUPLICATESSENSOR_NAME, SENSOR_PERIOD, SENSOR_TYPE| Constructor and Description |
|---|
WinRmCommandSensor(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.util.Map<java.lang.String,java.lang.String>> SENSOR_ENVIRONMENT
public WinRmCommandSensor(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)