Examples of ModelMBeanNotificationInfo


Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    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);
            }
        }
    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    if (notifTypes == null || notifTypes.length == 0) {
      throw new IllegalArgumentException("Must specify at least one notification type");
    }

    String description = notificationInfo.getDescription();
    return new ModelMBeanNotificationInfo(notifTypes, name, description);
  }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    public void addModelMBeanNotification(String[] type,
                                          String className,
                                          String description,
                                          Descriptor desc) {
        notifications.put(className,
                           new ModelMBeanNotificationInfo(type, className, description, desc));
    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    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);
            }
        }
    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    public void addModelMBeanNotification(String[] type,
                                          String className,
                                          String description,
                                          Descriptor desc) {
        notifications.put(className,
                           new ModelMBeanNotificationInfo(type, className, description, desc));
    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

    public final MBeanNotificationInfo[] getNotificationInfo() {
        MBeanNotificationInfo[] result = new MBeanNotificationInfo[2];
        Descriptor genericDescriptor = new DescriptorSupport(new String[] {
            "name=GENERIC", "descriptorType=notification", "log=T",
            "severity=5", "displayName=jmx.modelmbean.generic" });
        result[0] = new ModelMBeanNotificationInfo(new String[] {"jmx.modelmbean.generic" }, "GENERIC",
            "A text notification has been issued by the managed resource", genericDescriptor);
        Descriptor attributeDescriptor = new DescriptorSupport(new String[] {"name=ATTRIBUTE_CHANGE", "descriptorType=notification",
            "log=T", "severity=5", "displayName=jmx.attribute.change" });
        result[1] = new ModelMBeanNotificationInfo(new String[] {"jmx.attribute.change" }, "ATTRIBUTE_CHANGE",
            "Signifies that an observed MBean attribute value has changed", attributeDescriptor);
        return result;
    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

        // Return our cached information (if any)
        if (info != null)
            return (info);

        // Create and return a new information object
        info = new ModelMBeanNotificationInfo
            (getNotifTypes(), getName(), getDescription());
        return (info);

    }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

            (new String[] { "name=GENERIC",
                            "descriptorType=notification",
                            "log=T",
                            "severity=5",
                            "displayName=jmx.modelmbean.generic" });
        response[0] = new ModelMBeanNotificationInfo
            (new String[] { "jmx.modelmbean.generic" },
             "GENERIC",
             "Text message notification from the managed resource",
             descriptor);

        // Fill in entry for attribute change notifications
        descriptor = new DescriptorSupport
            (new String[] { "name=ATTRIBUTE_CHANGE",
                            "descriptorType=notification",
                            "log=T",
                            "severity=5",
                            "displayName=jmx.attribute.change" });
        response[1] = new ModelMBeanNotificationInfo
            (new String[] { "jmx.attribute.change" },
             "ATTRIBUTE_CHANGE",
             "Observed MBean attribute value has changed",
             descriptor);
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

        ModelMBeanConstructorInfo constructors[] =
            new ModelMBeanConstructorInfo[consts.length];
        for (int i = 0; i < consts.length; i++)
            constructors[i] = consts[i].createConstructorInfo();
        NotificationInfo notifs[] = getNotifications();
        ModelMBeanNotificationInfo notifications[] =
            new ModelMBeanNotificationInfo[notifs.length];
        for (int i = 0; i < notifs.length; i++)
            notifications[i] = notifs[i].createNotificationInfo();
        OperationInfo opers[] = getOperations();
        ModelMBeanOperationInfo operations[] =
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

        // Return our cached information (if any)
        if (info != null)
            return (info);

        // Create and return a new information object
        info = new ModelMBeanNotificationInfo
            (getNotifTypes(), getName(), getDescription());
        Descriptor descriptor = info.getDescriptor();
        addFields(descriptor);
        info.setDescriptor(descriptor);
        return (info);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.