public class ConstantValueTranslator extends ValueTranslatorImp
This implementation of @{link ValueTranslator} uses a static String value, that can be used as a parameter for Jmx operations.
If your Jmx operation requires a different type of data other than String, simply set the type to
the fully qualified name of the required type. A conversion will then take place which will
require your your desired class to have a string constructor, or be a Date
,
where the value is the milliseconds.
In the adapter configuration file this class is aliased as jmx-constant-value-translator which is the preferred alternative to the fully qualified classname when building your configuration.
DEFAULT_PARAMETER_TYPE
Constructor and Description |
---|
ConstantValueTranslator() |
ConstantValueTranslator(java.lang.String value,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
java.lang.Object |
getValue(AdaptrisMessage message)
Returns the object instance used as a parameter for a JMX operation call.
|
void |
setValue(AdaptrisMessage message,
java.lang.Object object)
Will set the given object value back into the AdaptrisMessage.
|
void |
setValue(java.lang.String value) |
getType, setType
public ConstantValueTranslator()
public ConstantValueTranslator(java.lang.String value, java.lang.String type)
public void setValue(AdaptrisMessage message, java.lang.Object object)
ValueTranslator
public java.lang.Object getValue(AdaptrisMessage message) throws CoreException
ValueTranslator
CoreException
public java.lang.String getValue()
public void setValue(java.lang.String value)