Package javax.management

Examples of javax.management.MBeanParameterInfo


                                    Descriptor desc) {
        MBeanParameterInfo[] params = null;
        if (paramTypes != null) {
            params = new MBeanParameterInfo[ paramTypes.length ];
            for (int i = 0; i < paramTypes.length; i++) {
                params[i] = new MBeanParameterInfo(paramNames[i],
                                                    paramTypes[i], paramDescs[i]);
            }
        }
   
        operations.put(name,
View Full Code Here


   @Override
   protected MBeanOperationInfo[] getInternalOperationInfo()
   {
      MBeanOperationInfo[] operations = new MBeanOperationInfo[1];
      MBeanParameterInfo[] getMCFAttributeParamInfo = new MBeanParameterInfo[]{ new MBeanParameterInfo("ManagedConnectionFactoryAttributeName", String.class.getName(), "The ManagedConnectionFactoryAttribute name")};
      operations[0] = new MBeanOperationInfo("getManagedConnectionFactoryAttribute", "Inspect the value of a ManagedConnectionFactory attribute", getMCFAttributeParamInfo, Object.class.getName(), MBeanOperationInfo.INFO);
      return operations;
     
   }
View Full Code Here

   {
      MBeanOperationInfo[] ops = new MBeanOperationInfo[3];

      MBeanParameterInfo[] createActivationSpecParams = new MBeanParameterInfo[]
      {
         new MBeanParameterInfo("MessagingType", Class.class.getName(), "The type of the message listener"),
         new MBeanParameterInfo("ActivationConfig", Collection.class.getName(), "A collection of activation config properties")
      };
      ops[0] = new MBeanOperationInfo("createActivationSpec", "Create an activation spec",
            createActivationSpecParams, ActivationSpec.class.getName(), MBeanOperationInfo.ACTION);

      MBeanParameterInfo[] activationParams = new MBeanParameterInfo[]
      {
         new MBeanParameterInfo("MessageEndpointFactory", MessageEndpointFactory.class.getName(), "The message endpoint factory"),
         new MBeanParameterInfo("ActivationSpec", ActivationSpec.class.getName(), "The activation spec")
      };
      ops[1] = new MBeanOperationInfo("endpointActivation", "Active the endpoint",
            activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
      ops[2] = new MBeanOperationInfo("endpointDeactivation", "Deactive the endpoint",
            activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
View Full Code Here

  
   private void outputParameters(PrintWriter out, MBeanParameterInfo[] params)
   {
      for (int i = 0; i < params.length; i++)
      {
         MBeanParameterInfo paramInfo = params[i];
         out.println("      <parameter>");
         out.println("         <description>" + paramInfo.getDescription() + "</description>");
         out.println("         <name>" + paramInfo.getName() + "</name>");
         out.println("         <type>" + paramInfo.getType() + "</type>");
         out.println("      </parameter>");
      }
   }
View Full Code Here

      MBeanParameterInfo[] paramInfo = methodInfo.getSignature();
      if( paramInfo != null )
      {
         for(int i = 0; i < paramInfo.length; i ++)
         {
            MBeanParameterInfo pinfo = paramInfo[i];
            String pname = pinfo.getName();
            String pdescription = pinfo.getDescription();

            // Generate a name if there is none
            if (pname == null)
               pname = "arg#" + i;
            Fields fields =  new DefaultFieldsImpl(pname);
            if (pdescription != null)
               fields.setField(Fields.DESCRIPTION, pdescription);
            MetaMapper[] paramMapper = {null};
            Class<?> paramType = loadTypeClass(pinfo.getType(), mbeanLoader);
            MetaType metaType = getMetaType(pinfo, paramType, metaData, true, null, paramMapper);
            fields.setField(Fields.META_TYPE, metaType);


            ManagedParameterImpl mp = new ManagedParameterImpl(fields);
View Full Code Here

      this.targetName = targetName;
      this.target = target;
      MBeanAttributeInfo[] attrInfo = null;
      MBeanConstructorInfo[] ctorInfo = null;
      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)
View Full Code Here

        // parameter information
        // this MBean is able to create new configurations
       
        MBeanParameterInfo[] params = new MBeanParameterInfo[1];
        params[0] =
        new MBeanParameterInfo(
        "name",
        "java.lang.String",
        "Create a Configuration");
       
        dOperations[0] =
View Full Code Here

       
        // has no parameters
        MBeanParameterInfo[] params = new MBeanParameterInfo[0];
        MBeanParameterInfo[] params2 = new MBeanParameterInfo[1];
       
        params2[0] = new MBeanParameterInfo(
            "name",
            "java.lang.String",
            "The name");
       
        dOperations[0] =
View Full Code Here

    // a return value are simple getters, while void methods are modifiers. At the
    // time of this writing, these assumptions all hold for PooledDataSource.
    // But beware the future.
    private static MBeanOperationInfo[] extractOpInfs()
    {
        MBeanParameterInfo user = new MBeanParameterInfo("user", "java.lang.String", "The database username of a pool-owner.");
        MBeanParameterInfo pwd = new MBeanParameterInfo("password", "java.lang.String", "The database password of a pool-owner.");
        MBeanParameterInfo[] userPass = {user, pwd};
        MBeanParameterInfo[] empty = {};

        Method[] meths = PooledDataSource.class.getMethods();
        Set attrInfos = new TreeSet(ManagementUtils.OP_INFO_COMPARATOR);
View Full Code Here

            for (Class<?> paramType: m.getParameterTypes()) {
                String paramName = "p" + (i ++);
                if (getPropertyEditor(source.getClass(), paramName, paramType) == null) {
                    continue;
                }
                signature.add(new MBeanParameterInfo(
                        paramName, convertType(
                                null, null, paramType, true).getName(),
                        paramName));
            }
   
View Full Code Here

TOP

Related Classes of javax.management.MBeanParameterInfo

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.