Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanInfoSupport


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


        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

    public static ModelMBean createModelMBean(Object o) {
        try {
            ModelMBean mbean = new RequiredModelMBean();
            JmxManaged annotation = o.getClass().getAnnotation(JmxManaged.class);
            String description = annotation == null ? "" : annotation.description();
            ModelMBeanInfo info = new ModelMBeanInfoSupport(o.getClass().getName(),
                                                            description,
                                                            extractAttributeInfo(o),
                                                            new ModelMBeanConstructorInfo[0],
                                                            extractOperationInfo(o),
                                                            new ModelMBeanNotificationInfo[0]);
View Full Code Here

  private static ModelMBeanInfo createModelMBeanInfo(Object obj) {
    ModelMBeanOperationInfo[] generateModelMBeanMethodInfo = generateModelMBeanMethodInfo(obj);
    ModelMBeanAttributeInfo[] generateModelMBeanAttributeInfo = generateModelMBeanAttributeInfo(obj);
    // create ModelMBeanInfo
    ModelMBeanInfo mbeanInfo = new ModelMBeanInfoSupport(//
        RequiredModelMBean.class.getName(), // MBean类
        obj.getClass().getName(), // 描述文字
        generateModelMBeanAttributeInfo,// 只有一个属性
        null, // 所有的构造函数信息
        generateModelMBeanMethodInfo,//
View Full Code Here

            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

    /**
     * Create and return a default <code>ModelMBeanInfo</code> object.
     */
    protected ModelMBeanInfo createDefaultModelMBeanInfo() {

        return (new ModelMBeanInfoSupport(this.getClass().getName(),
                                          "Default ModelMBean",
                                          null, null, null, null));

    }
View Full Code Here

    /**
     * Create and return a default <code>ModelMBeanInfo</code> object.
     */
    protected ModelMBeanInfo createDefaultModelMBeanInfo() {

        return (new ModelMBeanInfoSupport(this.getClass().getName(),
                                          "Default ModelMBean",
                                          null, null, null, null));

    }
View Full Code Here

            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

        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

            throw new AssertionError(e);
         }
      }

      //
      return new ModelMBeanInfoSupport(typeMD.getType().getName(), mbeanDescription, attributeInfos.values().toArray(
         new ModelMBeanAttributeInfo[attributeInfos.size()]), new ModelMBeanConstructorInfo[0], operations
         .toArray(new ModelMBeanOperationInfo[operations.size()]), new ModelMBeanNotificationInfo[0]);
   }
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.