@Override
public void handleNotification(Notification notification, Object handback) {
echo("\n<notification>");
echo("\t<currentDatetime>" + DATE_FORMAT.format(Calendar.getInstance().getTime()) + "</currentDatetime>");
echo("\t<notificationTimestamp>" + notification.getTimeStamp() + "</notificationTimestamp>");
echo("\t<notificationDatetime>" + DATE_FORMAT.format(new Date(notification.getTimeStamp())) + "</notificationDatetime>");
echo("\t<configName>" + handback.toString() + "</configName>");
echo("\t<className>" + notification.getClass().getName() + "</className>");
echo("\t<source>" + notification.getSource() + "</source>");
echo("\t<type>" + notification.getType() + "</type>");
echo("\t<message>" + notification.getMessage() + "</message>");
if (notification instanceof AttributeChangeNotification) {
echo("\t<attributeChanges>");
AttributeChangeNotification acn = (AttributeChangeNotification) notification;
echo("\t\t<attributeName>" + acn.getAttributeName() + "</attributeName>");
echo("\t\t<attributeType>" + acn.getAttributeType() + "</attributeType>");
echo("\t\t<newValue>" + acn.getNewValue() + "</newValue>");
echo("\t\t<oldValue>" + acn.getOldValue() + "</oldValue>");
echo("\t</attributeChanges>");
}
echo("\n</notification>");
}
JMXNotificationClient.java 文件源码
java
阅读 16
收藏 0
点赞 0
评论 0
项目:rocketmq-flink-plugin
作者:
评论列表
文章目录