FileDocCategorySizeDatePackage
RemoveNotifLsnrObjNameFilterHandbackCaller.javaAPI DocGlassfish v2 API4661Fri May 04 22:36:28 BST 2007com.sun.enterprise.admin.jmx.remote.server.callers

RemoveNotifLsnrObjNameFilterHandbackCaller

public class RemoveNotifLsnrObjNameFilterHandbackCaller extends AbstractMethodCaller
Invokes the method removeNotificationListener of the MBeanServerConnection.
see
MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER_OBJECTNAME_FILTER_HANDBACK
author
Kedar Mhaswade
since
S1AS8.0
version
1.0

Fields Summary
private static final Logger
logger
private com.sun.enterprise.admin.jmx.remote.server.notification.ServerNotificationManager
notifMgr
Constructors Summary
public RemoveNotifLsnrObjNameFilterHandbackCaller(MBeanServerConnection mbsc, com.sun.enterprise.admin.jmx.remote.server.notification.ServerNotificationManager mgr)


         
        super(mbsc);
        METHOD_ID = MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER_OBJECTNAME_FILTER_HANDBACK;
        this.notifMgr = mgr;
    
Methods Summary
public javax.management.remote.message.MBeanServerResponseMessagecall(javax.management.remote.message.MBeanServerRequestMessage request)

//        final Object result		= new UnsupportedOperationException("" + METHOD_ID);
        Object result		= null;
        boolean isException = false;

        ObjectName objname1 = (ObjectName) request.getParams()[0];
        ObjectName objname2 = (ObjectName) request.getParams()[1];
        NotificationFilter filter = (NotificationFilter) request.getParams()[2];
        Object handback = request.getParams()[3];
        String lsnrid = (String) request.getParams()[4];

        ListenerInfo info = notifMgr.removeObjNameNotificationListener(objname1, lsnrid);
        if (info == null)
            info = new ListenerInfo(null, filter, handback);
        try {
            mbsc.removeNotificationListener(objname1, objname2, info.filter, info.handback);
        } catch (Exception e) {
            result = e;
            isException = true;
        }

        return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) );