一直看到项目里面
缓存管理类CacheManagerImpl会使用
buildDynamicMBeanInfo方法
protected void buildDynamicMBeanInfo()
{
MBeanAttributeInfo[] dAttributes = { new MBeanAttributeInfo("cachestatus", "java.lang.String", getCacheInfo, true, false, false)
MBeanOperationInfo[] dOperations = { new MBeanOperationInfo("remove", clearByType, new MBeanParameterInfo[] { new MBeanParameterInfo("type", "java.lang.String", cacheType) }, "void", 1), new MBeanOperationInfo("remove", clearByKey, new MBeanParameterInfo[] { new MBeanParameterInfo("type", "java.lang.String", cacheType), new MBeanParameterInfo("key", "java.lang.String", cacheKey) }, "void", 1) };
this.dMBeanInfo = new MBeanInfo(getClass().getName(), cacheManager, dAttributes, null, dOperations, null);
}
这个方法是用来干嘛的,里面的MBeanOperationInfo[] dOperations 作用是啥,dMBeanInfo 用来干嘛的。
------解决思路----------------------
http://minghaitang.iteye.com/blog/538745
http://bluestar.iteye.com/blog/58083