I understand that within the realm of JMX you have an MXBean
, which is using only open types specified within Java. there are mappings between standard types and open types of course.
Now, I know you can extend those with your own custom types by providing your own mappings... What is the point of that? Does that not kill the purpose of using one common set of types, which is basically the definition of the MXBean
in the first place?
An MXBean, or more specifically, OpenTypes, allow you to supply a definition of a "complex" class broken down into its constituent components defined in supported standard types. For example, and this is drawn from this StackOverflow Answer, consider a JMS supporting class implementing this interface:
public interface JmsDestinationAttributesMBean {
public String getName();
public int getMessagesCurrentCount();
public int getConsumersCurrentCount();
}
Normally, JConsole wouldn't know what to do with this, but when exposed by an MXBean, it will render it as a String and two ints, along with some meta-data to describe what those values are.
See this tutorial for more in depth coverage.