Package javax.management

Examples of javax.management.MBeanInfo$ArrayGettersSafeAction


            String className = this.getClass().getName();
            MBeanAttributeInfo[] attrInfos = (MBeanAttributeInfo[]) allAttrs.toArray(new MBeanAttributeInfo[ allAttrs.size() ]);
            Class[] ctorArgClasses = {PooledDataSource.class, String.class, MBeanServer.class};
            MBeanConstructorInfo[] constrInfos
               = new MBeanConstructorInfo[] { new MBeanConstructorInfo("Constructor from PooledDataSource", this.getClass().getConstructor(ctorArgClasses)) };
            this.info = new MBeanInfo( this.getClass().getName(),
                            "An MBean to monitor and manage a PooledDataSource",
                            attrInfos,
                            constrInfos,
                            OP_INFS,
                            null);
View Full Code Here


        headers.add(new Header(param, param));
    }
    else
    {
      Iterator<ObjectName> it = objectNameSet.iterator();
      MBeanInfo info = connection.getMBeanInfo(it.next());
      MBeanAttributeInfo[] attrInfos = info.getAttributes();
      for (String param : params)
      {
        boolean found = false;
        for (MBeanAttributeInfo attrInfo : attrInfos)
        {
View Full Code Here

      sb.append(" as there are not registered in JMX");
      __logger.warn(sb.toString());
    }
    else
    {
      MBeanInfo info = connection.getMBeanInfo(objectName);
     
      MBeanAttributeInfo[] attrInfo = info.getAttributes();
      for (int j = 0; j < params.length; j++)
      {
        if (params[j] == null ||  "".equals(params[j].trim()))
          continue;
       
View Full Code Here

      _bean = bean;
      MBeanAttributeInfo []attrInfo;
   
      attrInfo = parseMethods(_bean, type);
   
      _info = new MBeanInfo(_bean.getBeanClass().getName(),
                            null,
                            attrInfo,
                            new MBeanConstructorInfo[0],
                            new MBeanOperationInfo[0],
                            new MBeanNotificationInfo[0]);
View Full Code Here

  }

  protected MBeanOperationInfo findClosestOperation(String name, Object []args)
    throws Exception
  {
    MBeanInfo info = getMbean_info();

    if (info == null)
      return null;
   
    MBeanOperationInfo []ops = info.getOperations();
   
    MBeanOperationInfo bestOp = null;
    long bestCost = Long.MAX_VALUE;

    for (int i = 0; i < ops.length; i++) {
View Full Code Here

   */
  private static void verifyMBean(IdxRegion region) throws Exception {
    final MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
    ObjectName objectName =
      IdxRegionMBeanImpl.generateObjectName(region.getRegionInfo());
    MBeanInfo mbeanInfo = mbs.getMBeanInfo(objectName);

    for (MBeanAttributeInfo aInfo : mbeanInfo.getAttributes()) {
      Object value = mbs.getAttribute(objectName, aInfo.getName());
      if (aInfo.isWritable()) {
        mbs.setAttribute(objectName, new Attribute(aInfo.getName(), value));
      }
    }

    for (MBeanOperationInfo oInfo : mbeanInfo.getOperations()) {
      if (oInfo.getSignature().length == 0) {
        mbs.invoke(objectName, oInfo.getName(), new Object[]{}, new String[]{});
      } else {
        LOG.warn("Did not test operation " + oInfo.getName());
      }
View Full Code Here

        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(),
        info.getNotifications(), info.getDescriptor());
    }
    super.cacheMBeanInfo(info);
  }
View Full Code Here

        MBeanConstructorInfo ctors[] = createMBeanConstructorInfo();
        MBeanOperationInfo opers[] = createMBeanOperationInfo();
        MBeanNotificationInfo notifs[] = createMBeanNotificationInfo();
        String className = getMBeanClassName();
        String description = getMBeanDescription();
        return new MBeanInfo(className, description, attrs, ctors, opers, notifs);
    }
View Full Code Here

        if ( serviceReference.getProperty(Constants.SERVICE_DESCRIPTION) != null ) {
            description = serviceReference.getProperty(Constants.SERVICE_DESCRIPTION).toString();
        } else {
            description = "Health check";
        }
        return new MBeanInfo(this.getClass().getName(),
                   description,
                   attrs.toArray(new MBeanAttributeInfo[attrs.size()]), null, null, null);
    }
View Full Code Here

                ObjectName objectName = (ObjectName) iterator.next();
                if (registry.containsKey(objectName)) {
                    // instance already registered
                    continue;
                }
                MBeanInfo mbeanInfo = null;
                try {
                    mbeanInfo = JMXUtil.toMBeanInfo(kernel.getGBeanInfo(objectName));
                } catch (GBeanNotFoundException e) {
                    // ignore - gbean already unregistered
                    continue;
View Full Code Here

TOP

Related Classes of javax.management.MBeanInfo$ArrayGettersSafeAction

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.