public class SshPollConfig<T> extends PollConfig<SshPollValue,T,SshPollConfig<T>>
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Predicate<SshPollValue> |
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(java.lang.String val) |
SshPollConfig<T> |
command(com.google.common.base.Supplier<java.lang.String> val) |
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) |
SshPollConfig<T> |
env(com.google.common.base.Supplier<java.util.Map<java.lang.String,java.lang.String>> val)
adds the given dynamic supplier of environment variables.
|
java.lang.String |
getCommand()
Deprecated.
since 0.7.0; use
getCommandSupplier() and resolve just-in-time |
com.google.common.base.Supplier<java.lang.String> |
getCommandSupplier() |
java.util.Map<java.lang.String,java.lang.String> |
getEnv()
Deprecated.
since 0.7.0; use
getEnvSupplier() and resolve just-in-time |
com.google.common.base.Supplier<java.util.Map<java.lang.String,java.lang.String>> |
getEnvSupplier() |
description, getDescription, getPeriod, period, period, period
checkSuccess, checkSuccess, equals, getCheckSuccess, getOnException, getOnFailure, getOnSuccess, getSensor, hasCheckSuccessHandler, hasExceptionHandler, hasFailureHandler, hashCode, hasSuccessHandler, onException, onFailure, onFailureOrException, onResult, onSuccess, setOnException, setOnFailure, setOnFailureOrException, setOnResult, setOnSuccess, toString
public static final com.google.common.base.Predicate<SshPollValue> DEFAULT_SUCCESS
public SshPollConfig(AttributeSensor<T> sensor)
public SshPollConfig(SshPollConfig<T> other)
public java.lang.String getCommand()
getCommandSupplier()
and resolve just-in-timepublic com.google.common.base.Supplier<java.lang.String> getCommandSupplier()
public java.util.Map<java.lang.String,java.lang.String> getEnv()
getEnvSupplier()
and resolve just-in-timepublic com.google.common.base.Supplier<java.util.Map<java.lang.String,java.lang.String>> getEnvSupplier()
public SshPollConfig<T> command(java.lang.String val)
public SshPollConfig<T> command(com.google.common.base.Supplier<java.lang.String> 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(com.google.common.base.Supplier<java.util.Map<java.lang.String,java.lang.String>> 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.