The proxygen tool takes the compiled Java class of an MBean and generates the Java interface and Java proxies. The Java proxies consist of Java source code that implements the interface. To develop a Java manager with code generated by proxygen, you call the methods of the proxy MBean's interface.
Options of the proxygen tool enable you to modify the characteristics of the proxies you generate from an MBean. For example, with some options, you can generate read-only or read-write proxies. By generating from the same MBean a set of proxies with different characteristics, you can develop a Java manager whose behavior is modified at runtime, depending on which proxies are loaded. For example, when the read-only proxies are loaded, the Java manager cannot modify properties in the MBean.
A proxy MBean consists of two components:
A Java interface that defines which operations of the MBean are accessible to a Java manager
A Java class that implements the operations defined in the Java interface
For example, if you have an MBean MyClass, the proxygen tool gives you a proxy MBean that consists of the following files.
MyClassProxyMBean.java: the Java interface
MyClassProxy.java: the Java class
The proxygen tool generates Java source code, not
compiled Java classes. For your proxy MBeans to be accessible to a Java manager,
you must compile the files that proxygen generates. Then
you must make sure that the compiled Java classes are stored at the location
specified by the CLASSPATH
environment
variable of the manager, or are accessible through the class loader of the
manager.