List of usage examples for javax.management ObjectInstance getClassName
public String getClassName()
From source file:org.xmatthew.spy2servers.component.spy.jmx.ActiveMQJmxSpyComponent.java
@Override protected void inspectMBean(ObjectInstance objectInstance, MBeanServerConnection mbsc) throws Exception { super.inspectMBean(objectInstance, mbsc); String className = objectInstance.getClassName(); if (ACTIVEMQ_QUEUE_MBEAN_CLASS.equals(className)) { inspectQueueMBean(objectInstance, mbsc); }/*from w w w. ja va 2 s .co m*/ if (ACTIVEMQ_CONNECTION_MBEAN_CLASS.equals(className)) { inspectConnectionMBean(objectInstance, mbsc); } }
From source file:org.xmatthew.spy2servers.component.spy.jmx.TomcatJmxSpyComponent.java
@Override protected void inspectMBean(ObjectInstance objectInstance, MBeanServerConnection mbsc) throws Exception { super.inspectMBean(objectInstance, mbsc); String mBeanClass = objectInstance.getClassName(); ObjectName objectName = objectInstance.getObjectName(); if (BASEMODELBEAN_CLASS.equals(mBeanClass) || BASEMODELBAEN_CLASS_CHANGED.equals(mBeanClass)) { String type = objectName.getKeyProperty(JmxSpySupportComponent.TYPE); String name = objectName.getKeyProperty(JmxSpySupportComponent.NAME); name = StringUtils.remove(name, "\""); //is a DataSource mbean if (DATASOURCE.equals(type)) { dataSourceMBeanSpy(name, getAttributesAsMap(objectName.toString(), mbsc, getDataSourceKeys())); } else if (MANAGER.equals(type)) { //is a web module mbean }//w w w.ja va2 s .c o m } }