public final class HttpRequestSensor<T> extends AbstractAddSensorFeed<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
Modifier and Type | Field and Description |
---|---|
static ConfigKey<java.util.Map<java.lang.String,java.lang.String>> |
HEADERS |
static ConfigKey<java.lang.String> |
JSON_PATH |
static ConfigKey<java.lang.String> |
PASSWORD |
static ConfigKey<java.lang.Boolean> |
PREEMPTIVE_BASIC_AUTH |
static ConfigKey<java.lang.String> |
SENSOR_URI |
static ConfigKey<java.lang.String> |
USERNAME |
LOG_WARNING_GRACE_TIME, LOG_WARNING_GRACE_TIME_ON_STARTUP, SUPPRESS_DUPLICATES
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 static final ConfigKey<java.util.Map<java.lang.String,java.lang.String>> HEADERS
public static final ConfigKey<java.lang.Boolean> PREEMPTIVE_BASIC_AUTH
public HttpRequestSensor(ConfigBag params)
public void apply(EntityLocal entity)
EntityInitializer
apply
in interface EntityInitializer
apply
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)