Module
JMX- Notification Emitter Action - UI Specification
Authors: Alexandre Neubert, Thomas Leveque, Jean-Francois Denise
Notification
Emitter Action
This action helps user
in generating code to allow an existing MBean to send notification.
This action results in some generated code at the end of selected MBean
class and the added
NotificationEmitter implemented interface declaration.
The action is enabled
for all MBean class which not implementing the NotificationBroadcaster interface.
Call
the Action
Current module actions are located under
Run menu. We could introduce a new
Management menu if the set of
actions requires it.
This ui spec defines a new
Management
menu. It could be replaced by a
Management
submenu
under
Tools.
- From contextual menu :
- The Notification
Emitter action is called by right click on a MBean
class in the project view.
- Select Management submenu. Select the Implement NotificationEmitter
Interface... item.
- From main menu :
- Management
menu then select the Implement
NotificationEmitter Interface...
item.

Scope
of the action
This action should
be accessible from any kind of project.
Action
Popup window
This popup windows allows user to provide for each added notification :
- Notification class name
- A description
- Some Notification types
Note : the table
has the same behaviour than the MBean wizard Define Notifications step.
This popup
appears
with an empty table. The Remove
Notification button is disabled when the table is empty.
The Add Notification button is enabled.
Ok and
Cancel buttons are always enabled.

Apply
Delegation to broadcaster pattern
The user can
choose to generate this pattern by selecting the Generate Delegation to Broadcaster
item. All the generated methods will be delegated to a default
notification broadcaster object.
Generate
a Sequence Number
The user can
choose to generate a sequence number by selecting the Generate Private Seq Number and Accessor
item. We will generate an accessor (getNextSeqNumber method) and a
private field for the sequence number.
Add
a Notification
The user can do
it in two
ways :
- Click on Add
Notification button.
- Type ALT + A keys.
A new Row appears with default values.
Remove
a Notification
The user can do
it in two
ways after selecting the row to remove :
- Click on Remove
Notification button.
- Type ALT + R keys.
The selected Row disappears and the next row is selected.
Specify
Notification class name
The user can do
it in two
ways :
- Type a class name.
- Select one of two Notification classes in the list
(javax.management.Notification or
javax.management.AttributeChangeNotification).
If the class name is
javax.management.AttributeChangeNotification class, the Type becomes
ATTRIBUTE_CHANGE and the Edit button
becomes disabled.
Specify
Description
The user can directly type a new description in the TextField.
Specify
Types
The user is allowed to change the notifications types only if the class
is different from
javax.management.AttributeChangeNotification.
He must click on the
Edit
button.
A popup titled Edit Notification Types appears. It is the same workflow
than in the MBean wizard.