KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > mx > remoting > NotificationEntry


1 /***************************************
2  * *
3  * JBoss: The OpenSource J2EE WebOS *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  ***************************************/

9 package org.jboss.mx.remoting;
10
11 import java.io.Serializable JavaDoc;
12 import javax.management.Notification JavaDoc;
13
14 /**
15  * NotificationEntry represents a Notification passed back to the client from a remote
16  * server so that the client can properly coorelate the Notification object with a specific
17  * client-side listener object, based on the handback, which was passed to the server by the
18  * client as a specific, unique key.
19  *
20  * @author <a HREF="mailto:jhaynie@vocalocity.net">Jeff Haynie</a>
21  * @version $Revision: 30392 $
22  */

23 public class NotificationEntry implements Serializable JavaDoc
24 {
25    static final long serialVersionUID = -8038783215990131189L;
26    
27    private final Notification JavaDoc notification;
28    private final Object JavaDoc handback;
29
30    public NotificationEntry(Notification JavaDoc n, Object JavaDoc h)
31    {
32       this.notification = n;
33       this.handback = h;
34    }
35
36    /**
37     * return the original Notification object
38     *
39     * @return
40     */

41    public Notification JavaDoc getNotification()
42    {
43       return notification;
44    }
45
46    /**
47     * return the client Handback Object, which is used to find the
48     * appropriate client-side Listener to re-dispatch the notification to
49     *
50     * @return
51     */

52    public Object JavaDoc getHandBack()
53    {
54       return handback;
55    }
56
57    public String JavaDoc toString()
58    {
59       return "NotificationEntry [notification:" + notification + ",handback:" + handback + "]";
60    }
61 }
62
Popular Tags