Package javax.management

Examples of javax.management.MBeanAttributeInfo


            configurationName,
            categoryName);
            server.registerMBean(categoryMBean, categoryObjectName);
           
            alMbeanAttributes.add(
            new MBeanAttributeInfo(
            "category=" + categoryName,
            "javax.management.ObjectName",
            "The " + categoryName + " category.",
            true,
            true,
View Full Code Here


    MBeanInfo info = _connection.getMBeanInfo(objectName);
    String title = null;
    String menuTitle = null;
    for (int i = 0; i < info.getAttributes().length; i++)
    {
      MBeanAttributeInfo attr = info.getAttributes()[i];
      if ("Title".equals(attr.getName()) && attr.isReadable())
        title = (String) _connection.getAttribute(objectName, attr.getName());
      if ("MenuTitle".equals(attr.getName()) && attr.isReadable())
        menuTitle = (String) _connection.getAttribute(objectName, attr.getName());

    }
    PageImpl page = new PageImpl(name, title, menuTitle);
    page.setObjectName(objectName);
    return page;
View Full Code Here

  {
    MBeanInfo info = _connection.getMBeanInfo(objectName);

    for (int i = 0; i < info.getAttributes().length; i++)
    {
      MBeanAttributeInfo attr = info.getAttributes()[i];
      if ("SubPages".equals(attr.getName()) && attr.isReadable())
      {
        ObjectName[] subPages = (ObjectName[]) _connection.getAttribute(objectName, attr.getName());
        if (subPages != null)
        {
          for (ObjectName name : subPages)
            page.add(getDynamicPage(name));
        }
View Full Code Here

            AttrRec rec = attrRecForAttribute(attr);
            if (rec == null)
                throw new AttributeNotFoundException(attr);
            else
            {
                MBeanAttributeInfo ai = rec.attrInfo;
                if (! ai.isReadable() )
                    throw new IllegalArgumentException(attr + " not readable.");
                else
                {
                    String name = ai.getName();
                    String pfx = ai.isIs() ? "is" : "get";
                    String mname = pfx + Character.toUpperCase(name.charAt(0)) + name.substring(1);
                    Object target = rec.target;
                    Method m = target.getClass().getMethod(mname, null);
                    return m.invoke(target, null);
                }
View Full Code Here

            AttrRec rec = attrRecForAttribute(attr);
            if (rec == null)
                throw new AttributeNotFoundException(attr);
            else
            {
                MBeanAttributeInfo ai = rec.attrInfo;
                if (! ai.isWritable() )
                    throw new IllegalArgumentException(attr + " not writable.");
                else
                {
                    Class attrType = ClassUtils.forName( rec.attrInfo.getType() );
                    String name = ai.getName();
                    String pfx = "set";
                    String mname = pfx + Character.toUpperCase(name.charAt(0)) + name.substring(1);
                    Object target = rec.target;
                    Method m = target.getClass().getMethod(mname, new Class[] {attrType});
                    m.invoke(target, new Object[] { attrObj.getValue() });
View Full Code Here

                     * future invocation.
                     */

                    try
                    {
                        out.put( name, new MBeanAttributeInfo(name, desc, getter, setter) );
                    }
                    catch (javax.management.IntrospectionException e)
                    {
                        if (logger.isLoggable( MLevel.WARNING ))
                            logger.log( MLevel.WARNING, "IntrospectionException while setting up MBean attribute '" + name + "'", e);
View Full Code Here

      if (method.getParameterTypes().length == 0
          && Modifier.isPublic(method.getModifiers())
          && name.startsWith("get")) {
        name = name.substring(3);
       
        MBeanAttributeInfo attr;
       
        attr = new MBeanAttributeInfo(name,
                                      null,
                                      method,
                                      null);
       
        list.add(attr);
View Full Code Here

      System.arraycopy(existingInfos, 0, attributeInfos, 0,
        existingInfos.length);
      Iterator<String> columnNameIterator = columnNames.iterator();
      for (int i = existingInfos.length; i < attributeInfos.length; i++) {
        String name = columnNameIterator.next() + ".heapSize";
        attributeInfos[i] = new MBeanAttributeInfo(name,
          "long", "The amount of heap space occupied by this index", true,
          false, false);
      }
      info = new MBeanInfo(info.getClassName(), info.getDescription(),
        attributeInfos, info.getConstructors(), info.getOperations(),
View Full Code Here

     */
    private void addAttribute(List mBeanAttributeInfoList, MethodSignature method,
            Class attributeType, String performanceDataType, String description)
    {
        String attributeName = buildAttributeName(method, performanceDataType);
        MBeanAttributeInfo infoCount = new MBeanAttributeInfo(attributeName, attributeType
                .getName(), description, true, false, false);
        mBeanAttributeInfoList.add(infoCount);
    }
View Full Code Here

     *
     * @return the MBeanInfo of the MBean
     */
    private MBeanInfo createMBeanInfo()
    {
        MBeanAttributeInfo attrs[] = createMBeanAttributeInfo();
        MBeanConstructorInfo ctors[] = createMBeanConstructorInfo();
        MBeanOperationInfo opers[] = createMBeanOperationInfo();
        MBeanNotificationInfo notifs[] = createMBeanNotificationInfo();
        String className = getMBeanClassName();
        String description = getMBeanDescription();
View Full Code Here

TOP

Related Classes of javax.management.MBeanAttributeInfo

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.