public void sendAttributeChangeNotification(Attribute oldAttribute, Attribute newAttribute) throws MBeanException, RuntimeOperationsException
{
if (oldAttribute == null || newAttribute == null) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_ATTRIBUTE_CANNOT_BE_NULL.toLocalizedString()));
if (!oldAttribute.getName().equals(newAttribute.getName())) throw new RuntimeOperationsException(new IllegalArgumentException(LocalizedStrings.MX4JModelMBean_ATTRIBUTE_NAMES_CANNOT_BE_DIFFERENT.toLocalizedString()));
// TODO: the source must be the object name of the MBean if the listener was registered through MBeanServer
Object oldValue = oldAttribute.getValue();
AttributeChangeNotification n = new AttributeChangeNotification(this,
1,
System.currentTimeMillis(),
"Attribute value changed",
oldAttribute.getName(),
oldValue == null ? null : oldValue.getClass().getName(),
oldValue,
newAttribute.getValue());
sendAttributeChangeNotification(n);
}
MX4JModelMBean.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:gemfirexd-oss
作者:
评论列表
文章目录