Package javax.management

Examples of javax.management.MBeanOperationInfo


      MBeanParameterInfo[] sig = {
        new  MBeanParameterInfo("invocation", Invocation.class.getName(),
           "The invocation content information")
      };
      MBeanOperationInfo[] opInfo = {
         new MBeanOperationInfo("invoke", "The detached invoker entry point",
            sig, "java.lang.Object", MBeanOperationInfo.ACTION)
      };
      MBeanNotificationInfo[] eventInfo = null;
      this.info = new MBeanInfo(getClass().getName(),
         "A wrapper inovker that delegates to the target invoker",
View Full Code Here


        "name",
        "java.lang.String",
        "Create a Configuration");
       
        dOperations[0] =
            new MBeanOperationInfo(
            "loadConfiguration",
            "loadConfiguration(): loads a Configuration",
            params,
            "javax.management.ObjectName",
            MBeanOperationInfo.ACTION);
View Full Code Here

            "name",
            "java.lang.String",
            "The name");
       
        dOperations[0] =
            new MBeanOperationInfo(
                "reloadConfiguration",
                "reloadConfiguration(): reloads configuration",
                params,
                "void",
                MBeanOperationInfo.ACTION);
       
        dOperations[1] =
            new MBeanOperationInfo(
                "saveConfiguration",
                "saveConfiguration(): saves configuration",
                params,
                "void",
                MBeanOperationInfo.ACTION);
       
        dOperations[2] =
            new MBeanOperationInfo(
                "addCategory",
                "addCategory(String name): create new category",
                params2,
                "void",
                MBeanOperationInfo.ACTION);
View Full Code Here

    _objectName = objectName;

    MBeanInfo info = _connection.getMBeanInfo(_objectName);
    for (int i = 0; i < info.getOperations().length; i++)
    {
      MBeanOperationInfo operation = info.getOperations()[i];
      if ("handle".equals(operation.getName()))
      {
        MBeanParameterInfo[] signatures =  operation.getSignature();
        if (signatures.length == 1 && signatures[0].getType().equals(HANDLE[0]))
        {
          _connection.invoke(_objectName, "handle", new Object[] { _request }, HANDLE);
        }
      }
View Full Code Here

    MBeanInfo info = _connection.getMBeanInfo(_objectName);
    boolean foundSimple = false;
    boolean foundComplex = false;
    for (int i = 0; i < info.getOperations().length; i++)
    {
      MBeanOperationInfo operation = info.getOperations()[i];
      if ("print".equals(operation.getName()))
      {
        MBeanParameterInfo[] signatures =  operation.getSignature();
        if (signatures.length == 1 && signatures[0].getType().equals(SIMPLE_SIGNATURE[0]))
          foundSimple = true;
        else if (signatures.length == 2
            && signatures[0].getType().equals(COMPLEX_SIGNATURE[0])
            && signatures[1].getType().equals(COMPLEX_SIGNATURE[1]))
View Full Code Here

            else if (params.length == 0)
                pi = empty;
            else
                pi = null;

            MBeanOperationInfo opi;
            if (pi != null)
                opi = new MBeanOperationInfo( mname, // name
                                null,  // desc
                                pi,
                                retType.getName(),
                                impact );
            else
            {
                //System.err.println("autobuilding opi from meth " + meth);
                opi = new MBeanOperationInfo(meth.toString(), meth);
            }

            //System.err.println("Created MBeanOperationInfo: " + opi + " [" + opi.getName() + ']');
            attrInfos.add( opi );
        }
View Full Code Here

      for (int i = 0; i < size; i++) {
        args[i] = values.get(LongValue.create(i)).toJavaObject();
      }

      MBeanOperationInfo opInfo = findClosestOperation(name, args);

      if (opInfo != null) {
        String []mbeanSig = createMBeanSig(opInfo);

        marshall(args, mbeanSig);
View Full Code Here

    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++) {
      MBeanOperationInfo op = ops[i];
     
      if (! name.equals(op.getName()))
        continue;

      if (op.getSignature().length == args.length) {
        long cost = calculateCost(op.getSignature(), args);

        if (cost < bestCost) {
          bestCost = cost;
          bestOp = op;
        }
View Full Code Here

     */
    private MBeanInfo createMBeanInfo()
    {
        MBeanAttributeInfo attrs[] = createMBeanAttributeInfo();
        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

    {
        MBeanParameterInfo parameterInfo[] = new MBeanParameterInfo[1];
        parameterInfo[0] = new MBeanParameterInfo("loggerPattern", "java.lang.String",
                "Name of the Logger. Use * as wildcard");
        return new MBeanOperationInfo[]
        { new MBeanOperationInfo("addLoggerMBean", "Adds a MBean for a single Logger or "
                + "a group of Loggers", parameterInfo, "void", 1) };
    }
View Full Code Here

TOP

Related Classes of javax.management.MBeanOperationInfo

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.