![]() |
|||
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
![]() ![]() |
![]() |
| ||
3.5 Output of the proxygen ToolFor an MBean defined in the Java class BeanName, the proxygen tool generates the following.
For example, when an MBean representing a Java class named Simple is compiled, the proxygen tool generates the source code for the following classes.
3.6 Mapping RulesThe proxygen tool uses the Java Reflection API for analyzing an MBean and generating its associated proxy MBean. The proxygen tool 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. 3.6.1 Mapping of AttributesThe proxygen tool 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. 3.6.2 Mapping of OperationsIn addition to the attribute accessors, the proxygen tool generates code only for exposed operations of the MBean itself. 3.6.3 Methods in the Proxy InterfaceThe proxy MBeans that the proxygen tool generates also contain methods that are not present in the MBean. These methods are defined in the Java interface com.sun.jdmk.Proxy. The proxy MBean that is 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 that instantiate them. The purpose of these methods is twofold:
3.7 Using the Generated CodeThe proxygen tool generates Java source code that you can use for developing Java managers. To develop a Java manager with code generated by the proxygen tool, use the RemoteMBeanServer interface. By using this interface, you can develop Java managers without having to modify the code that the proxygen tool generates. Nevertheless, if you want to define a specific view of an MBean, you can modify the code that the proxygen tool generates. To ensure that the modified code remains consistent with the MBean that it represents, modify only the proxy and not the interface. | ||
| ||
![]() |