public class CommandPollConfig<T> extends PollConfig<SshPollValue,T,CommandPollConfig<T>>
Modifier and Type | Field and Description |
---|---|
static <any> |
DEFAULT_SUCCESS |
NO_SENSOR, REMOVE, UNCHANGED
Constructor and Description |
---|
CommandPollConfig(AttributeSensor<T> sensor) |
CommandPollConfig(CommandPollConfig<T> other) |
Modifier and Type | Method and Description |
---|---|
CommandPollConfig<T> |
command(<any> val) |
CommandPollConfig<T> |
command(java.lang.String val) |
CommandPollConfig<T> |
env(<any> val)
adds the given dynamic supplier of environment variables.
|
CommandPollConfig<T> |
env(java.util.Map<java.lang.String,java.lang.String> val)
add the given env params; sequence is as per
#env(Supplier) . |
CommandPollConfig<T> |
env(java.lang.String key,
java.lang.String val)
add the given env param; sequence is as per
#env(Supplier) |
static CommandPollConfig<java.lang.Void> |
forMultiple() |
static <T> CommandPollConfig<T> |
forSensor(AttributeSensor<T> sensor) |
<any> |
getCommandSupplier() |
<any> |
getEnvSupplier() |
description, getDescription, getPeriod, period, period, period
checkSuccess, checkSuccess, enabled, equals, getCheckSuccess, getLogWarningGraceTime, getLogWarningGraceTimeOnStartup, getOnException, getOnFailure, getOnSuccess, getSensor, getSupressDuplicates, hasCheckSuccessHandler, hasExceptionHandler, hasFailureHandler, hashCode, hasSuccessHandler, isEnabled, logWarningGraceTime, logWarningGraceTimeOnStartup, onException, onFailure, onFailureOrException, onResult, onSuccess, setOnException, setOnFailure, setOnFailureOrException, setOnResult, setOnSuccess, suppressDuplicates, toString
public CommandPollConfig(AttributeSensor<T> sensor)
public CommandPollConfig(CommandPollConfig<T> other)
public static <T> CommandPollConfig<T> forSensor(AttributeSensor<T> sensor)
public static CommandPollConfig<java.lang.Void> forMultiple()
public <any> getCommandSupplier()
public <any> getEnvSupplier()
public CommandPollConfig<T> command(java.lang.String val)
public CommandPollConfig<T> command(<any> val)
public CommandPollConfig<T> env(java.lang.String key, java.lang.String val)
#env(Supplier)
public CommandPollConfig<T> env(java.util.Map<java.lang.String,java.lang.String> val)
#env(Supplier)
.
behaviour is undefined if the map supplied here is subsequently changed.
if a map's contents might change, use #env(Supplier)
public CommandPollConfig<T> env(<any> val)
use of a supplier allows env vars to be computed on each execution, for example to take the most recent sensor values.
in the case of multiple map suppliers, static maps, or static env(String, String)
key value pairs, the order in which they are specified here is the order
in which they are computed and applied.