KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jmx > remote > internal > ClientListenerInfo


1 /*
2  * @(#)ClientListenerInfo.java 1.2 04/01/26
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.jmx.remote.internal;
9
10 import javax.security.auth.Subject JavaDoc;
11
12 import javax.management.Notification JavaDoc;
13 import javax.management.NotificationListener JavaDoc;
14 import javax.management.NotificationFilter JavaDoc;
15 import javax.management.ObjectName JavaDoc;
16
17 public class ClientListenerInfo extends ListenerInfo {
18     public ClientListenerInfo(Integer JavaDoc listenerID,
19                   ObjectName JavaDoc name,
20                   NotificationListener JavaDoc listener,
21                   NotificationFilter JavaDoc filter,
22                   Object JavaDoc handback,
23                   Subject JavaDoc delegationSubject) {
24     super(listenerID, name, listener, filter, handback,
25           delegationSubject);
26     }
27     
28     public boolean sameAs(ObjectName JavaDoc name,
29               NotificationListener JavaDoc listener,
30               NotificationFilter JavaDoc filter,
31               Object JavaDoc handback) {
32     return ( getObjectName().equals(name) &&
33          getListener() == listener &&
34          getNotificationFilter() == filter &&
35          getHandback() == handback);
36     }
37     
38     public boolean sameAs(ObjectName JavaDoc name,
39               NotificationListener JavaDoc listener) {
40     return ( getObjectName().equals(name) &&
41          getListener() == listener);
42     }
43     
44     public boolean sameAs(ObjectName JavaDoc name) {
45     return (getObjectName().equals(name));
46     }
47 }
48
Popular Tags