|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.event.ListenerInfo
public class ListenerInfo extends Object
This class specifies all the information required to register a user listener into a remote MBean server. This class is not serializable because a user listener is not serialized in order to be sent to the remote server.
| Constructor and Description |
|---|
ListenerInfo(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback,
boolean isSubscription)
Constructs a ListenerInfo object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one. |
NotificationFilter |
getFilter()
Returns the listener filter. |
Object |
getHandback()
Returns the listener handback. |
NotificationListener |
getListener()
Returns the listener. |
ObjectName |
getObjectName()
Returns an MBean or an MBean pattern that the listener listens to. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
isSubscription()
Returns true if this is a subscription listener. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ListenerInfo(ObjectName name,
NotificationListener listener,
NotificationFilter filter,
Object handback,
boolean isSubscription)
ListenerInfo object.
name - The name of the MBean to which the listener should
be added.listener - The listener object which will handle the
notifications emitted by the MBean.filter - The filter object. If the filter is null, no
filtering will be performed before notifications are handled.handback - The context to be sent to the listener when a
notification is emitted.isSubscription - If true, the listener is subscribed via
an EventManager. Otherwise it is added to a registered MBean.| Method Detail |
|---|
public ObjectName getObjectName()
public NotificationListener getListener()
public NotificationFilter getFilter()
public Object getHandback()
public boolean isSubscription()
EventClient.addListeners(java.util.Collection) public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.
The return value is true if and only if o is an instance of
ListenerInfo and has equal values for all of its properties.
equals in class Objecto - the reference object with which to compare.true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
HashMappublic int hashCode()
ObjectHashMap.
The general contract of hashCode is:
hashCode method
must consistently return the same integer, provided no information
used in equals comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
equals(Object)
method, then calling the hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hash tables.
As much as is reasonably practical, the hashCode method defined by
class Object does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
JavaTM programming language.)
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class Object
|
Java™ Platform Standard Ed. 7 DRAFT ea-b76 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.