Package javax.management.modelmbean

Examples of javax.management.modelmbean.ModelMBeanInfoSupport


      for (Iterator iterator = opsMap.values().iterator(); iterator.hasNext(); position++)
      {
         operations[position] = (ModelMBeanOperationInfo) iterator.next();
      }

      return new ModelMBeanInfoSupport(
            info.getClassName(), info.getDescription(),
            (ModelMBeanAttributeInfo[]) info.getAttributes(),
            (ModelMBeanConstructorInfo[]) info.getConstructors(),
            operations,
            (ModelMBeanNotificationInfo[]) info.getNotifications(),
View Full Code Here


      ModelMBeanConstructorInfo[] constrInfo =
         buildConstructorInfo(constructors);
      ModelMBeanNotificationInfo[] notifInfo =
         buildNotificationInfo(notifications);

      ModelMBeanInfo info = new ModelMBeanInfoSupport(
         mmbClassName, description, attrInfo, constrInfo,
         operInfo, notifInfo, descr
      );

      return info;
View Full Code Here

         if( descriptor.getFieldValue(ModelMBeanConstants.NAME) == null )
            descriptor.setField(ModelMBeanConstants.NAME, getClassName());
         if( descriptor.getFieldValue(ModelMBeanConstants.DESCRIPTOR_TYPE) == null )
            descriptor.setField(ModelMBeanConstants.DESCRIPTOR_TYPE, ModelMBeanConstants.MBEAN_DESCRIPTOR);
      }
      ModelMBeanInfo info = new ModelMBeanInfoSupport(
         mmbClassName, description, attrs, ctors,
         ops, msgs, descriptor);
      return info;
   }
View Full Code Here

        mmboi[1] = new ModelMBeanOperationInfo("stop", "Stop DSpace Kernel", null, "void",
                ModelMBeanOperationInfo.ACTION);
        mmboi[2] = new ModelMBeanOperationInfo("getManagedBean", "Get the Current Kernel", null,
                DSpaceKernel.class.getName(), ModelMBeanOperationInfo.INFO);

        return new ModelMBeanInfoSupport(this.getClass().getName(), "DSpace Kernel", mmbai, null, mmboi, null);
    }
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

        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

        }

        // 4894856: ModelMBeanInfoSupport.setDescriptor(d, "mbean") fails
        System.out.println("Checking that setDescriptor(d, \"mbean\") works");
        ModelMBeanInfo mmbi =
            new ModelMBeanInfoSupport("x", "descr", null, null, null, null);
        Descriptor d = mmbi.getDescriptor("x", "mbean");
        try {
            mmbi.setDescriptor(d, "mbean");
        } catch (Exception e) {
            System.out.println("Unexpected exception:");
            e.printStackTrace(System.out);
            ok = false;
        }
View Full Code Here

                                        false,
                                        map2AttributeDescriptor);

        // ModelMBeanInfo

        ModelMBeanInfo mmbi = new ModelMBeanInfoSupport(
            Resource.class.getName(),
            "Resource MBean",
            new ModelMBeanAttributeInfo[] { nullAttributeInfo,
                                            integerAttributeInfo,
                                            hashtableAttributeInfo,
View Full Code Here

                                        true,
                                        false,
                                        somethingCachedAttributeDescriptor);
        // ModelMBeanInfo

        ModelMBeanInfo mmbi = new ModelMBeanInfoSupport(
            Resource.class.getName(),
            "Resource MBean",
            new ModelMBeanAttributeInfo[] { somethingAttributeInfo, somethingCachedAttributeInfo },
            null,
            new ModelMBeanOperationInfo[] {},
View Full Code Here

        ModelMBeanAttributeInfo countInfo =
            new ModelMBeanAttributeInfo("Count", "Count description",
                                        getCountMethod, setCountMethod,
                                        countDescriptor);
        ModelMBeanInfo mmbi =
            new ModelMBeanInfoSupport(Resource.class.getName(),
                                      "ModelMBean to test targetObject",
                                      new ModelMBeanAttributeInfo[] {countInfo},
                                      null,  // no constructors
                                      new ModelMBeanOperationInfo[] {
                                          operationInfo, getCountInfo, setCountInfo
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.