Examples of ModelMBeanNotificationInfo


Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

      MBeanNotificationInfo[] notifications = info.getNotifications();
      ModelMBeanNotificationInfo[] mmbNotifications = new ModelMBeanNotificationInfo[notifications.length];

      for (int i = 0; i < notifications.length; ++i)
      {
         mmbNotifications[i] = new ModelMBeanNotificationInfo(
            notifications[i].getNotifTypes(),
            notifications[i].getName(),
            notifications[i].getDescription()
         );
      }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

         {
            Element type = (Element) iterator.next();
            types.add(type.getTextTrim());
         }

         ModelMBeanNotificationInfo info = new ModelMBeanNotificationInfo(
            (String[]) types.toArray(), name, descr
         );

         infos.add(info);
      }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

         ModelMBeanConstructorInfo info = getConstructor((String)descr.getFieldValue(ModelMBeanConstants.NAME));
         info.setDescriptor(descr);
      }
      else if (descrType.equalsIgnoreCase(ModelMBeanConstants.NOTIFICATION_DESCRIPTOR))
      {
         ModelMBeanNotificationInfo info = getNotification((String)descr.getFieldValue(ModelMBeanConstants.NAME));
         info.setDescriptor(descr);
      }
      else
         throw new RuntimeOperationsException(new IllegalArgumentException("unknown descriptor type: " + descrType));
   }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

     */
    public 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

        // Create the associated ModelMBeanInfo
        ModelMBeanInfo info = http.createMBeanInfo();
        assertNotNull("Found HttpConnector ModelMBeanInfo", info);

        // Retrieve the specified ModelMBeanNotificationInfo
        ModelMBeanNotificationInfo mmninfo = info.getNotification("Problem");
        assertNotNull("Found HttpConnector problem info", mmninfo);

        // Get the Descriptor
        Descriptor desc = mmninfo.getDescriptor();
        assertNotNull("Found HttpConnector problem descriptor", desc);

        // Check the configured fields
        checkDescriptor(desc, "field1", "HttpConnector.problem/field1");
        checkDescriptor(desc, "field2", "HttpConnector.problem/field2");
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

   public ModelMBeanNotificationInfo createModelMBeanNotificationInfo()
   {
      String[] names = new String[]{"name", "descriptortype", "severity", "displayname"/*, "messageId", "log", "logfile"*/};
      Object[] values = new Object[]{"name", "notification", "5", "name"/*, "0", "???", "???"*/};
      DescriptorSupport descriptor = new DescriptorSupport(names, values);
      return new ModelMBeanNotificationInfo(new String[]{"type1", "type2"}, "name", "description", descriptor);
   }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

     */
    public 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

    public final MBeanNotificationInfo[] getNotificationInfo() {
        MBeanNotificationInfo[] result = new MBeanNotificationInfo[2];
        Descriptor genericDescriptor = new DescriptorSupport(new String[] {
            "name=GENERIC", "descriptorType=notification", "LOGGER=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",
            "LOGGER=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

      DescriptorSupport ds = new DescriptorSupport(new String[]{
         "name=badthing",
         "descriptorType=NOTification",
         "severity=1"
      });
      ModelMBeanNotificationInfo info =
              new ModelMBeanNotificationInfo(new String[]{"bad.thing"},
                                             "badthing",
                                             "The bad thing happened",
                                             ds);
   }
View Full Code Here

Examples of javax.management.modelmbean.ModelMBeanNotificationInfo

   public void compareModelMBeanNotificationInfo(Object o1, Object o2)
   {
      compareMBeanNotificationInfo(o1, o2);

      ModelMBeanNotificationInfo n1 = (ModelMBeanNotificationInfo)o1;
      ModelMBeanNotificationInfo n2 = (ModelMBeanNotificationInfo)o2;
      compareDescriptorSupport(n1.getDescriptor(), n2.getDescriptor());
   }
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.