public MBeanInfo getMBeanInfo() {
MBeanParameterInfo[] noParams = new MBeanParameterInfo[] {};
MBeanConstructorInfo[] ctorInfo = getInternalConstructorInfo();
MBeanAttributeInfo[] attrs = getInternalAttributeInfo();
MBeanAttributeInfo[] attrInfo = new MBeanAttributeInfo[3 + attrs.length];
attrInfo[0] = new MBeanAttributeInfo("Name",
"java.lang.String",
"Return the service name",
true,
false,
false);
attrInfo[1] = new MBeanAttributeInfo("State",
"int",
"Return the service state",
true,
false,
false);
attrInfo[2] = new MBeanAttributeInfo("StateString",
"java.lang.String",
"Return the service's state as a String",
true,
false,
false);
System.arraycopy(attrs, 0, attrInfo, 3, attrs.length);
MBeanParameterInfo[] jbossInternalLifecycleParms = new MBeanParameterInfo[1];
jbossInternalLifecycleParms[0] = new MBeanParameterInfo("method", String.class.getName(), "The lifecycle method");
MBeanOperationInfo[] ops = getInternalOperationInfo();
MBeanOperationInfo[] opInfo = new MBeanOperationInfo[5 + ops.length];
opInfo[0] = new MBeanOperationInfo("create",
"create service lifecycle operation",
noParams,
"void",
MBeanOperationInfo.ACTION);
opInfo[1] = new MBeanOperationInfo("start",
"start service lifecycle operation",
noParams,
"void",
MBeanOperationInfo.ACTION);
opInfo[2] = new MBeanOperationInfo("stop",
"stop service lifecycle operation",
noParams,
"void",
MBeanOperationInfo.ACTION);
opInfo[3] = new MBeanOperationInfo("destroy",
"destroy service lifecycle operation",
noParams,
"void",
MBeanOperationInfo.ACTION);
opInfo[4] = new MBeanOperationInfo(ServiceController.JBOSS_INTERNAL_LIFECYCLE,
"Internal lifecycle (for internal use)",
jbossInternalLifecycleParms,
"void",
MBeanOperationInfo.ACTION);
System.arraycopy(ops, 0, opInfo, 5, ops.length);
MBeanNotificationInfo[] notifyInfo = getInternalNotificationInfo();
return new MBeanInfo(getClass().getName(),
getInternalDescription(),
attrInfo,
ctorInfo,
opInfo,
notifyInfo);
}
|