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.remote.message.MBeanServerRequestMessage; 38 import javax.management.remote.message.MBeanServerResponseMessage; 39 40 41 47 48 public class GetMBeanCountCaller extends AbstractMethodCaller { 49 50 private static final Logger logger = Logger.getLogger( 51 DefaultConfiguration.JMXCONNECTOR_LOGGER); 53 54 55 public GetMBeanCountCaller(MBeanServerConnection mbsc) { 56 super(mbsc); 57 METHOD_ID = MBeanServerRequestMessage.GET_MBEAN_COUNT; 58 logger.finer("GetMBeanCountCaller ctor called"); 59 } 60 61 public MBeanServerResponseMessage call(MBeanServerRequestMessage request) { 62 Object result = null; 63 boolean isException = false; 64 try { 65 result = mbsc.getMBeanCount(); 66 } 67 catch(Throwable e) { 68 result = e; 69 isException = true; 70 } 71 return ( new MBeanServerResponseMessage(METHOD_ID, result, isException) ); 72 } 73 } 74 | Popular Tags |