Java Reference
In-Depth Information
Figure 10.4
Using an MBean to wrap the M-let service to provide notifications
You wrap the M-let service as an MBean in order to shield users from any imple-
mentation change. Using this wrapped M-let service is the same as using the M-
let service. To create this MBean “wrapper,” you must write an MBean and a
notification class. Let's begin with the notification class.
10.4.1
Writing the MLetNotification class
The notifications used in this example are defined by the MLetNotification
class. To keep it simple, the notification will contain the three notification types
shown in table 10.3.
Table 10.3
The notification types used by the MLet wrapper
Notification type
Description
jmxbook.mletwrapper.urlAdded
Indicates that a URL value was added successfully
Indicates that an MBean was created successfully from
an M-let file
jmxbook.mletwrapper.mbeanCreated
jmxbook.mletwrapper.error
Indicates that an error occurred in some M-let service
operation
Search WWH ::




Custom Search