FileDocCategorySizeDatePackage
ListenerInfo.javaAPI DocGlassfish v2 API3570Fri May 04 22:36:24 BST 2007com.sun.enterprise.admin.jmx.remote.notification

ListenerInfo

public class ListenerInfo extends Object
This class is a composite of a NotificationListener, NotificationFilter and a handback object. The listener, filter and handback objects that are being registered by the client via a call to addNotificationListener are set into a new ListenerInfo object. This ListenerInfo object is then registered in the NotificationManagers.

Fields Summary
public Object
proxy
public NotificationListener
listener
public NotificationFilter
filter
public Object
handback
public String
id
Constructors Summary
public ListenerInfo()


      
    
public ListenerInfo(NotificationListener listener, NotificationFilter filter, Object handback)

        this.listener = listener;
        this.filter = filter;
        this.handback = handback;
        id = computeId();
    
Methods Summary
public java.lang.StringcomputeId()
Compute an id for this object. The id generated by this method is used to match a listener, filter, handback combination both on the server-side and client-side

        String listenerCode = "null";
        if (listener != null)
            listenerCode = Integer.toString(listener.hashCode());
        String filterCode = "null";
        if (filter != null)
            filterCode = Integer.toString(filter.hashCode());
        String handbackCode = "null";
        if (handback != null)
            handbackCode = Integer.toString(handback.hashCode());
        return  ( listenerCode + ":" + filterCode + ":" + handbackCode );