public class SshPollConfig<T> extends PollConfig<SshPollValue,T,SshPollConfig<T>>
Modifier and Type | Field and Description |
---|---|
static |
DEFAULT_SUCCESS |
NO_SENSOR, REMOVE, UNCHANGED, UNSET
Constructor and Description |
---|
SshPollConfig(AttributeSensor<T> sensor) |
SshPollConfig(SshPollConfig<T> other) |
Modifier and Type | Method and Description |
---|---|
SshPollConfig<T> |
command( |
SshPollConfig<T> |
command(java.lang.String val) |
SshPollConfig<T> |
env(
adds the given dynamic supplier of environment variables.
|
SshPollConfig<T> |
env(java.util.Map<java.lang.String,java.lang.String> val)
add the given env params; sequence is as per
#env(Supplier) . |
SshPollConfig<T> |
env(java.lang.String key,
java.lang.String val)
add the given env param; sequence is as per
#env(Supplier) |
java.lang.String |
getCommand()
Deprecated.
since 0.7.0; use
getCommandSupplier() and resolve just-in-time |
|
getCommandSupplier() |
java.util.Map<java.lang.String,java.lang.String> |
getEnv()
Deprecated.
since 0.7.0; use
getEnvSupplier() and resolve just-in-time |
|
getEnvSupplier() |
description, getDescription, getPeriod, period, period, period
checkSuccess, checkSuccess, enabled, equals, getCheckSuccess, getOnException, getOnFailure, getOnSuccess, getSensor, getSupressDuplicates, hasCheckSuccessHandler, hasExceptionHandler, hasFailureHandler, hashCode, hasSuccessHandler, isEnabled, onException, onFailure, onFailureOrException, onResult, onSuccess, setOnException, setOnFailure, setOnFailureOrException, setOnResult, setOnSuccess, suppressDuplicates, toString
public SshPollConfig(AttributeSensor<T> sensor)
public SshPollConfig(SshPollConfig<T> other)
public java.lang.String getCommand()
getCommandSupplier()
and resolve just-in-timepublicgetCommandSupplier()
public java.util.Map<java.lang.String,java.lang.String> getEnv()
getEnvSupplier()
and resolve just-in-timepublicgetEnvSupplier()
public SshPollConfig<T> command(java.lang.String val)
public SshPollConfig<T> command(val)
public SshPollConfig<T> env(java.lang.String key, java.lang.String val)
#env(Supplier)
public SshPollConfig<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 SshPollConfig<T> env(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.