public MBeanNotificationInfo[] getNotificationInfo() { NotificationType[] values = NotificationType.values(); String[] names = new String[values.length]; for (int i = 0; i < values.length; i++) { names[i] = values[i].toString(); } return new MBeanNotificationInfo[] { new MBeanNotificationInfo(names, this.getClass().getName(), "Notifications emitted by a Core Server") }; }
private ServerMessage createQueueInfoMessage(final NotificationType type, final SimpleString queueName) { ServerMessage message = new ServerMessageImpl(storageManager.generateUniqueID(), 50); message.setAddress(queueName); String uid = UUIDGenerator.getInstance().generateStringUUID(); message.putStringProperty(ManagementHelper.HDR_NOTIFICATION_TYPE, new SimpleString(type.toString())); message.putLongProperty(ManagementHelper.HDR_NOTIFICATION_TIMESTAMP, System.currentTimeMillis()); message.putStringProperty(new SimpleString("foobar"), new SimpleString(uid)); return message; }
NotificationType ntype = NotificationType.valueOf(type.toString());
new SimpleString(notification.getType().toString()));