%@page contentType="text/html"
import="java.net.*,java.util.*,javax.management.*,javax.management.modelmbean.*,
org.jboss.jmx.adaptor.control.Server,
org.jboss.jmx.adaptor.control.AttrResultInfo,
org.jboss.jmx.adaptor.model.*,
java.lang.reflect.Array"
%>
<%! public String fixDescription(String desc)
{
if (desc == null || desc.equals(""))
{
return "(no description)";
}
return desc;
}
%>
MBean Inspector
<%
ObjectName objectName = mbeanData.getObjectName();
String objectNameString = mbeanData.getName();
MBeanInfo mbeanInfo = mbeanData.getMetaData();
MBeanAttributeInfo[] attributeInfo = mbeanInfo.getAttributes();
MBeanOperationInfo[] operationInfo = mbeanInfo.getOperations();
%>
|
JMX MBean View |
MBean Name: |
Domain Name: |
<%= objectName.getDomain() %> |
<%
Hashtable properties = objectName.getKeyPropertyList();
Iterator it = properties.keySet().iterator();
while( it.hasNext() )
{
String key = (String) it.next();
String value = (String) properties.get( key );
%>
| <%= key %>: | <%= value %> |
<%
}
%>
MBean Java Class: | |
MBean description:
<%= fixDescription(mbeanInfo.getDescription())%>
List of MBean attributes:
List of MBean operations:
<%
for(int a = 0; a < operationInfo.length; a ++)
{
MBeanOperationInfo opInfo = operationInfo[a];
boolean accept = true;
if (opInfo instanceof ModelMBeanOperationInfo)
{
Descriptor desc = ((ModelMBeanOperationInfo)opInfo).getDescriptor();
String role = (String)desc.getFieldValue("role");
if ("getter".equals(role) || "setter".equals(role))
{
accept = false;
}
}
if (accept)
{
MBeanParameterInfo[] sig = opInfo.getSignature();
%>
<%
}
}
%>