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