@Beta public final class HttpRequestSensor<T> extends AddSensor<T>
EntityInitializer which adds an HTTP sensor feed to retrieve the
JSONObject from a JSON response in order to populate the sensor with the data at the jsonPath.SshCommandSensor,
JmxAttributeSensor| Modifier and Type | Field and Description |
|---|---|
static ConfigKey<java.lang.String> |
JSON_PATH |
static ConfigKey<java.lang.String> |
PASSWORD |
static ConfigKey<java.lang.String> |
SENSOR_URI |
static ConfigKey<java.lang.String> |
USERNAME |
SENSOR_NAME, SENSOR_PERIOD, SENSOR_TYPE| Constructor and Description |
|---|
HttpRequestSensor(ConfigBag params) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(EntityLocal entity)
Applies initialization logic to a just-built entity.
|
public static final ConfigKey<java.lang.String> SENSOR_URI
public static final ConfigKey<java.lang.String> JSON_PATH
public static final ConfigKey<java.lang.String> USERNAME
public static final ConfigKey<java.lang.String> PASSWORD
public HttpRequestSensor(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)