The proxygen compiler uses the Java Reflection API for analyzing an MBean and generating its associated proxy MBean. It parses an MBean using the JMX-specific design patterns. The mapping rules that proxygen uses for generating the proxy MBean are described in the following subsections.
proxygen generates code only for exposed operations of the MBean itself. Each attribute of the MBean is present in the proxy MBean with the same accessor getter and setter methods. Therefore, if an attribute is read-only in the MBean, the property is read-only in the generated proxy MBean.
In addition to the attribute accessors, proxygen generates code only for exposed operations of the MBean itself.
The proxy MBeans that proxygen generates also contain methods that are not present in the MBean. Rather, they are defined in the Java interface com.sun.jdmk.Proxy. The proxy MBean generated implements this interface. These methods are public methods that do not follow the design patterns defined by the JavaBeans component model.
These methods provide additional functionality for proxy MBeans and the management applications which instantiate them. Their purpose is to:
Make sure that the information provided by proxy MBean is up to date. For example, methods are defined for binding and unbinding a proxy MBean from a remote MBean server
Get the object name and class of the remote MBean represented by the proxy MBean