1 7 8 package com.sun.jmx.remote.internal; 9 10 import javax.management.NotificationFilter ; 11 import javax.management.NotificationListener ; 12 import javax.management.ObjectName ; 13 14 import javax.security.auth.Subject ; 15 16 17 29 public class ListenerInfo { 30 public ListenerInfo(Integer listenerID, 31 ObjectName name, 32 NotificationFilter filter) { 33 this.listenerID = listenerID; 34 this.name = name; 35 this.filter = filter; 36 } 37 38 public ListenerInfo(Integer listenerID, 39 ObjectName name, 40 NotificationListener listener, 41 NotificationFilter filter, 42 Object handback, 43 Subject delegationSubject) { 44 this.listenerID = listenerID; 45 this.name = name; 46 this.listener = listener; 47 this.filter = filter; 48 this.handback = handback; 49 this.delegationSubject = delegationSubject; 50 } 51 52 public boolean equals(Object o) { 53 if (!(o instanceof ListenerInfo)) { 54 return false; 55 } 56 57 return listenerID.equals(((ListenerInfo)o).listenerID); 58 } 59 60 public int hashCode() { 61 return listenerID.intValue(); 62 } 63 64 public ObjectName getObjectName() { 65 return name; 66 } 67 68 public Integer getListenerID() { 69 return listenerID; 70 } 71 72 public NotificationFilter getNotificationFilter() { 73 return filter; 74 } 75 76 public NotificationListener getListener() { 77 return listener; 78 } 79 80 public Object getHandback() { 81 return handback; 82 } 83 84 public Subject getDelegationSubject() { 85 return delegationSubject; 86 } 87 88 private ObjectName name; 89 private Integer listenerID; 90 private NotificationFilter filter; 91 92 private NotificationListener listener = null; 93 private Object handback = null; 94 private Subject delegationSubject = null; 95 } 96 | Popular Tags |