I'm using JMX to save some diagnostic information from a remote process. Looking at the interface in jconsole shows that the return type is CompositeData (the data actually comes back as CompositeDataSupport). I want to output all the key/value pairs that are associated with this object.
The problem is that the interface just seems to have a "values()" method with no way of getting the keys. Am I missing something here? Is there some other way to approach this task?
Thanks!
If I'm not mistaken you could do
Set< String > keys = cData.getCompositeType().keySet();
(given that cData is a CompositeData object)
http://java.sun.com/j2se/1.5.0/docs/api/javax/management/openmbean/CompositeType.html#keySet()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With