Search in sources :

Example 1 with ManagedNotification

use of org.apache.camel.api.management.ManagedNotification in project camel by apache.

the class MBeanInfoAssembler method extractMbeanNotifications.

private void extractMbeanNotifications(Object managedBean, Set<ModelMBeanNotificationInfo> mBeanNotifications) {
    ManagedNotifications notifications = managedBean.getClass().getAnnotation(ManagedNotifications.class);
    if (notifications != null) {
        for (ManagedNotification notification : notifications.value()) {
            ModelMBeanNotificationInfo info = new ModelMBeanNotificationInfo(notification.notificationTypes(), notification.name(), notification.description());
            mBeanNotifications.add(info);
            LOG.trace("Assembled notification: {}", info);
        }
    }
}
Also used : ModelMBeanNotificationInfo(javax.management.modelmbean.ModelMBeanNotificationInfo) ManagedNotifications(org.apache.camel.api.management.ManagedNotifications) ManagedNotification(org.apache.camel.api.management.ManagedNotification)

Aggregations

ModelMBeanNotificationInfo (javax.management.modelmbean.ModelMBeanNotificationInfo)1 ManagedNotification (org.apache.camel.api.management.ManagedNotification)1 ManagedNotifications (org.apache.camel.api.management.ManagedNotifications)1