public class ObjectMetadataValueTranslator extends ValueTranslatorImp
This implementation of ValueTranslator
will pull an object metadata value from the
AdaptrisMessage
to be used as a Jmx operation parameter. Conversely we can also take a
string result from a Jmx operation call and create a new/overwrite an existing object metadata
item with the new value.
Note that no data conversion will take place. The object class being pulled from object metadata will be used as is to source the jmx operation parameter.
In the adapter configuration file this class is aliased as jmx-object-metadata-value-translator which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
log |
DEFAULT_PARAMETER_TYPE
Constructor and Description |
---|
ObjectMetadataValueTranslator() |
ObjectMetadataValueTranslator(java.lang.String metadataKey,
java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMetadataKey() |
java.lang.Object |
getValue(AdaptrisMessage message)
Returns the object instance used as a parameter for a JMX operation call.
|
void |
setMetadataKey(java.lang.String metadataKey) |
void |
setValue(AdaptrisMessage message,
java.lang.Object value)
Will set the given object value back into the AdaptrisMessage.
|
getType, setType
public ObjectMetadataValueTranslator()
public ObjectMetadataValueTranslator(java.lang.String metadataKey, java.lang.String type)
public java.lang.Object getValue(AdaptrisMessage message)
ValueTranslator
public void setValue(AdaptrisMessage message, java.lang.Object value)
ValueTranslator
public java.lang.String getMetadataKey()
public void setMetadataKey(java.lang.String metadataKey)