public class TypedAttribute extends Object implements Serializable, SMITransformType, TransformType
TypedAttribute is the combination of a attribute name
and a Class instance denoting the name and type of a MBean
attribute value. Various transformation methods provide mappings to and from
SNMP values.| Constructor and Description |
|---|
TypedAttribute(String name,
Class type) |
TypedAttribute(String name,
String type) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
Class |
getType() |
boolean |
isNativeValueAlwaysNeeded()
Indicates whether a caller of a "toNative" transformation needs to provide
the old native value in order to get a successful transformation.
|
Object |
transformFromNative(Object nativeValue,
ObjectName objectName) |
void |
transformObject2SMI(Object object,
org.snmp4j.smi.Variable value) |
Object |
transformSMI2Object(org.snmp4j.smi.Variable value) |
Object |
transformToNative(Object transformedValue,
Object oldNativeValue,
ObjectName objectName) |
public TypedAttribute(String name, String type) throws ClassNotFoundException
ClassNotFoundExceptionpublic String getName()
public Class getType()
public void transformObject2SMI(Object object, org.snmp4j.smi.Variable value)
transformObject2SMI in interface SMITransformTypepublic Object transformSMI2Object(org.snmp4j.smi.Variable value)
transformSMI2Object in interface SMITransformTypepublic Object transformFromNative(Object nativeValue, ObjectName objectName)
transformFromNative in interface TransformTypepublic Object transformToNative(Object transformedValue, Object oldNativeValue, ObjectName objectName)
transformToNative in interface TransformTypepublic boolean isNativeValueAlwaysNeeded()
TransformTypenull to save CPU cycles.isNativeValueAlwaysNeeded in interface TransformTypetrue if the caller must always provide a none
null value for the nativeValue parameter of
the transformation methods.Copyright © 2014 SNMP4J.org. All Rights Reserved.