KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > Emitter


1 package example;
2
3 import javax.management.NotificationBroadcasterSupport JavaDoc;
4 import javax.management.Notification JavaDoc;
5
6 /**
7  * Implements an MBean which sends notifications.
8  */

9 public class Emitter extends NotificationBroadcasterSupport JavaDoc
10   implements EmitterMBean {
11   private long _sequence;
12   
13   /**
14    * Sends a notification.
15    */

16   public void send()
17   {
18     Notification JavaDoc notif;
19
20     notif = new Notification JavaDoc("example.send", this, _sequence++);
21
22     sendNotification(notif);
23   }
24 }
25
Popular Tags