Java Dynamic Management Kit 3.2 Programming Guide
[ Previous ][ Fast Back ]Chapter 6. C-Beans[ Fast Forward ][ Next ]

Interface and Stub of a C-Bean

A c-bean consists of:

The interface of a c-bean exposes the properties and actions of the corresponding m-bean. The properties are represented by the same getter and setter methods as in the m-bean. The m-bean's actions also have an equivalent performAction() method in the c-bean. All methods have the same signature as in the original m-bean, apart from the exceptions which are proper to the c-bean interface.

All c-bean interfaces also extend the com.sun.jaw.reference.client.mo.ManagedObject interface in order to provide additional management capabilities. This functionality is described in Methods in the ManagedObject Interface.

The stub provides an implementation for the c-bean's interface. Therefore, the stub contains the code to implement the getter, setter and performAction() methods of the c-bean. To do this the stub relies on the com.sun.jaw.reference.client.adaptor.AdaptorMO interface. This interface specifies the API for the adaptor client object which the management application uses to communicate with its agents. For example, the stub implementation of a getter method calls the appropriate methods of the AdaptorMO interface. Through this interface, the corresponding getter method of the m-bean is called remotely, and its result is sent back to the c-bean.

Since the AdaptorMO interface is used by all adaptor clients in the Java Dynamic Management Kit, all c-beans can be connected to their corresponding m-bean through any of the communications protocols. It also garantees that the behavior of the stubs is not affected by how the adaptor client is implemented. For more information on the AdaptorMO interface, refer to The AdaptorMO Interface in Chapter 7.

Figure 6-1 shows the relationship between a c-bean interface (labled MOinterface), its stub implementation (labeled MOStub) and the AdaptorMO interface of an adaptor client.

Figure 6-1. Interface and Stub of a C-Bean

fig396.epsi


[ Previous ][ Home ][ Next ]
C-Beans[ Up ]Overview of the mogen Compiler