/**
* Send the supplied {@link Notification} using the wrapped
* {@link ModelMBean} instance.
* @param notification the {@link Notification} to be sent
* @throws IllegalArgumentException if the supplied {@code notification} is {@code null}
* @throws UnableToSendNotificationException if the supplied {@code notification} could not be sent
*/
@Override
public void sendNotification(Notification notification) {
Assert.notNull(notification, "Notification must not be null");
replaceNotificationSourceIfNecessary(notification);
try {
if (notification instanceof AttributeChangeNotification) {
this.modelMBean.sendAttributeChangeNotification((AttributeChangeNotification) notification);
}
else {
this.modelMBean.sendNotification(notification);
}
}
catch (MBeanException ex) {
throw new UnableToSendNotificationException("Unable to send notification [" + notification + "]", ex);
}
}
ModelMBeanNotificationPublisher.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录