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

RemoveNotifLsnrCaller

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

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

/*, 
        DefaultConfiguration.LOGGER_RESOURCE_BUNDLE_NAME );*/

         
        super(mbsc);
        METHOD_ID = MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER;
        this.notifyMgr = 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 objname  = (ObjectName) request.getParams()[0];
        String cid = (String) request.getParams()[1];
        String[] ids = (String[]) request.getParams()[2];

        NotificationListener proxy = null;
        try {
            for (int i=0; i < ids.length; i++) {
                proxy = (NotificationListener)
                            notifyMgr.removeNotificationListener(objname, ids[i]);
                mbsc.removeNotificationListener(objname, proxy);
            }
        } catch (Exception e) {
            result = e;
            isException = true;
        }
        return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) );