|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.aries.jmx.codec.PropertyData<T>
public class PropertyData<T>
PropertyData represents Property Type @see JmxConstants.PROPERTY_TYPE
. It is a codec for the
CompositeData
representing a Property with an associated Type and Value.
Method Summary | ||
---|---|---|
static
|
from(CompositeData compositeData)
Constructs a PropertyData object from the given CompositeData |
|
String |
getEncodedType()
|
|
String |
getEncodedValue()
|
|
String |
getKey()
|
|
T |
getValue()
|
|
boolean |
isEncodingPrimitive()
|
|
static PropertyData<Boolean> |
newInstance(String key,
boolean value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive boolean type |
|
static PropertyData<Byte> |
newInstance(String key,
byte value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive byte type |
|
static PropertyData<Character> |
newInstance(String key,
char value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive char type |
|
static PropertyData<Double> |
newInstance(String key,
double value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive double type |
|
static PropertyData<Float> |
newInstance(String key,
float value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive float type |
|
static PropertyData<Integer> |
newInstance(String key,
int value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive int type |
|
static PropertyData<Long> |
newInstance(String key,
long value)
Static factory method for PropertyData instance which preserves encoded type
information for primitive long type |
|
static
|
newInstance(String key,
T value)
Static factory method for PropertyData instance parameterized by value's type |
|
CompositeData |
toCompositeData()
Returns CompositeData representing a Property typed by JmxConstants.PROPERTY_TYPE . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> PropertyData<T> newInstance(String key, T value) throws IllegalArgumentException
PropertyData
instance parameterized by value's type
T
- key
- value
- an instance of JmxConstants.SCALAR
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Integer> newInstance(String key, int value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive int type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Long> newInstance(String key, long value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive long type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Float> newInstance(String key, float value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive float type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Double> newInstance(String key, double value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive double type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Byte> newInstance(String key, byte value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive byte type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Character> newInstance(String key, char value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive char type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic static PropertyData<Boolean> newInstance(String key, boolean value) throws IllegalArgumentException
PropertyData
instance which preserves encoded type
information for primitive boolean type
key
- value
-
IllegalArgumentException
- if key or value are null or value's type cannot be encodedpublic CompositeData toCompositeData()
JmxConstants.PROPERTY_TYPE
.
public static <T> PropertyData<T> from(CompositeData compositeData) throws IllegalArgumentException
PropertyData
object from the given CompositeData
compositeData
-
IlleglArgumentException
- if compositeData is null or not of type JmxConstants.PROPERTY_TYPE
IllegalArgumentException
public String getKey()
public T getValue()
public String getEncodedType()
public String getEncodedValue()
public boolean isEncodingPrimitive()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |