CompositeDataView
Interface CompositeDataView
public interface CompositeDataView
A Java class can implement this interface to indicate how it is to be converted into a CompositeData
by the MXBean framework.
A typical way to use this class is to add extra items to the CompositeData
in addition to the ones that are declared in the CompositeType
supplied by the MXBean framework. To do this, you must create another CompositeType
that has all the same items, plus your extra items.
For example, suppose you have a class Measure
that consists of a String called units
and a value
that is either a long
or a double
. It might look like this:
public class Measure implements CompositeDataView { private String units; private Number value; // a Long or a Double public Measur