1 23 24 29 30 31 package com.sun.enterprise.admin.jmx.remote.server.callers; 32 33 import java.util.logging.Logger ; 34 35 import javax.management.MBeanServerConnection ; 36 import javax.management.ObjectName ; 37 import javax.management.remote.message.MBeanServerRequestMessage; 38 import javax.management.remote.message.MBeanServerResponseMessage; 39 import com.sun.enterprise.admin.jmx.remote.DefaultConfiguration; 40 41 47 48 public class RemoveNotifLsnrObjNameCaller extends AbstractMethodCaller { 49 50 private static final Logger logger = Logger.getLogger( 51 DefaultConfiguration.JMXCONNECTOR_LOGGER); 53 54 public RemoveNotifLsnrObjNameCaller(MBeanServerConnection mbsc) { 55 super(mbsc); 56 METHOD_ID = MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER_OBJECTNAME; 57 } 58 59 public javax.management.remote.message.MBeanServerResponseMessage call(MBeanServerRequestMessage request) { 60 Object result = null; 62 boolean isException = false; 63 64 ObjectName objname1 = (ObjectName ) request.getParams()[0]; 65 ObjectName objname2 = (ObjectName ) request.getParams()[1]; 66 67 try { 68 mbsc.removeNotificationListener(objname1, objname2); 69 } catch (Exception e) { 70 result = e; 71 isException = true; 72 } 73 74 return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) ); 75 } 76 } 77 | Popular Tags |