Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanInfoSupport


            operations =
                (ModelMBeanOperationInfo[]) list.toArray(operations);
        */
       
        // Construct and return a new ModelMBeanInfo object
        info = new ModelMBeanInfoSupport
            (getClassName(), getDescription(),
             attributes, constructors, operations, notifications);
        try {
            Descriptor descriptor = info.getMBeanDescriptor();
            Iterator fields = getFields().iterator();
View Full Code Here


            constructors.values().toArray(new ModelMBeanConstructorInfo[0]);
       
        ModelMBeanNotificationInfo[] notifs =
            notifications.values().toArray(new ModelMBeanNotificationInfo[0]);
               
        return new ModelMBeanInfoSupport("javax.management.modelmbean.ModelMBeanInfo",
                                         "description",
                                         atts,
                                         cons,
                                         ops,
                                         notifs, desc);
View Full Code Here

   * @see #populateMBeanDescriptor(javax.management.Descriptor, Object, String)
   */
  @Override
  public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException {
    checkManagedBean(managedBean);
    ModelMBeanInfo info = new ModelMBeanInfoSupport(
        getClassName(managedBean, beanKey), getDescription(managedBean, beanKey),
        getAttributeInfo(managedBean, beanKey), getConstructorInfo(managedBean, beanKey),
        getOperationInfo(managedBean, beanKey), getNotificationInfo(managedBean, beanKey));
    Descriptor desc = info.getMBeanDescriptor();
    populateMBeanDescriptor(desc, managedBean, beanKey);
    info.setMBeanDescriptor(desc);
    return info;
  }
View Full Code Here

  }

  @Test
  public void testRegisterExistingMBeanWithUserSuppliedObjectName() throws Exception {
    ObjectName objectName = ObjectNameManager.getInstance("spring:name=Foo");
    ModelMBeanInfo info = new ModelMBeanInfoSupport("myClass", "myDescription", null, null, null, null);
    RequiredModelMBean bean = new RequiredModelMBean(info);

    MBeanExporter exporter = new MBeanExporter();
    exporter.setServer(getServer());
    exporter.registerManagedResource(bean, objectName);
View Full Code Here

        addOperations(operations, source);
        addExtraOperations(operations);
        operations.add(new ModelMBeanOperationInfo("unregisterMBean", "unregisterMBean", new MBeanParameterInfo[0],
                void.class.getName(), ModelMBeanOperationInfo.ACTION));

        return new ModelMBeanInfoSupport(className, description,
                attributes.toArray(new ModelMBeanAttributeInfo[attributes.size()]), constructors,
                operations.toArray(new ModelMBeanOperationInfo[operations.size()]), notifications);
    }
View Full Code Here

    for (int i = 0; i < opcount; i++) {
      final Method m = operations.get(i);
      ops[i] = new ModelMBeanOperationInfo(m.getName(), m);
    }

    ModelMBeanInfo mmbi = new ModelMBeanInfoSupport(resource.getClass()
        .getName(), resource.getClass().getName(), attrs, null, // constructors
        ops, null); // notifications
    ModelMBean mmb = new RequiredModelMBean(mmbi);
    mmb.setManagedResource(resource, "ObjectReference");
    return mmb;
View Full Code Here

    * Generates and returns the management interface.
    */
   public ModelMBeanInfo getInfo()
   {
      // Assemble the mbean info
      ModelMBeanInfoSupport info = new ModelMBeanInfoSupport(
         className,
         "Javabean model mbean",
         (ModelMBeanAttributeInfo[])mmais.toArray(new ModelMBeanAttributeInfo[mmais.size()]),
         new ModelMBeanConstructorInfo[0],
         (ModelMBeanOperationInfo[])mmois.toArray(new ModelMBeanOperationInfo[mmois.size()]),
View Full Code Here

   * @see #getNotificationInfo(Object, String)
   * @see #populateMBeanDescriptor(javax.management.Descriptor, Object, String)
   */
  public ModelMBeanInfo getMBeanInfo(Object managedBean, String beanKey) throws JMException {
    checkManagedBean(managedBean);
    ModelMBeanInfo info = new ModelMBeanInfoSupport(
        getClassName(managedBean, beanKey), getDescription(managedBean, beanKey),
        getAttributeInfo(managedBean, beanKey), getConstructorInfo(managedBean, beanKey),
        getOperationInfo(managedBean, beanKey), getNotificationInfo(managedBean, beanKey));
    Descriptor desc = info.getMBeanDescriptor();
    populateMBeanDescriptor(desc, managedBean, beanKey);
    info.setMBeanDescriptor(desc);
    return info;
  }
View Full Code Here

        String description = getDescription(customManagedBean != null ? customManagedBean : defaultManagedBean, objectName);
        ModelMBeanAttributeInfo[] arrayAttributes = mBeanAttributes.toArray(new ModelMBeanAttributeInfo[mBeanAttributes.size()]);
        ModelMBeanOperationInfo[] arrayOperations = mBeanOperations.toArray(new ModelMBeanOperationInfo[mBeanOperations.size()]);
        ModelMBeanNotificationInfo[] arrayNotifications = mBeanNotifications.toArray(new ModelMBeanNotificationInfo[mBeanNotifications.size()]);

        ModelMBeanInfo info = new ModelMBeanInfoSupport(name, description, arrayAttributes, null, arrayOperations, arrayNotifications);
        LOG.trace("Created ModelMBeanInfo {}", info);
        return info;
    }
View Full Code Here

         getSizeInfo,
         getValueInfo,
         getInfo
      };
      ModelMBeanNotificationInfo[] notifyInfo = null;
      ModelMBeanInfoSupport info = new ModelMBeanInfoSupport
              (RequiredModelMBeanInstantiator.getClassName(),
                      "Managed Bean Registry",
                      attrInfo,
                      ctorInfo,
                      opInfo,
View Full Code Here

TOP

Related Classes of javax.management.modelmbean.ModelMBeanInfoSupport

Copyright © 2018 www.massapicom. 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.