Package javax.management

Examples of javax.management.MBeanParameterInfo


      return (null);
  }

  try  {
      Class methodParams[] = null;
      MBeanParameterInfo params[] = op.getSignature();

      methodName = op.getName();

      if ((params != null) && (params.length > 0))  {
          methodParams = new Class [ params.length ];
View Full Code Here


            String[] signature)  {
  if (op == null)  {
      return (false);
  }

  MBeanParameterInfo params[] = op.getSignature();

  /*
   * Operation info has no parameters.
   */
  if (params == null)  {
View Full Code Here

            {
                String param_desc = bundle.getString(signature + "[" + i + "]");
                parts=param_desc.split(" *: *",2);
                if (Log.isDebugEnabled())
                    Log.debug(parts[0]+": "+parts[1]);
                pInfo[i] = new MBeanParameterInfo(parts[0].trim(), args[i], parts[1].trim());
            }

            // build the operation info
            Method method = oClass.getMethod(method_name, types);
            Class returnClass = method.getReturnType();
View Full Code Here

        for(int i = 0; i < params.length; i++) {
            boolean hasAnnotation = false;
            for(int j = 0; j < annotations[i].length; j++) {
                if(annotations[i][j] instanceof JmxParam) {
                    JmxParam param = (JmxParam) annotations[i][j];
                    params[i] = new MBeanParameterInfo(param.name(),
                                                       types[i].getName(),
                                                       param.description());
                    hasAnnotation = true;
                    break;
                }
            }
            if(!hasAnnotation) {
                params[i] = new MBeanParameterInfo("", types[i].getName(), "");
            }
        }

        return params;
    }
View Full Code Here

            List gparameters = gOperationInfo.getParameterList();
            MBeanParameterInfo[] parameters = new MBeanParameterInfo[gparameters.size()];
            int p = 0;
            for (Iterator piterator = gparameters.iterator(); piterator.hasNext();) {
                String type = (String) piterator.next();
                parameters[p] = new MBeanParameterInfo("parameter" + p, type, "no description available");
                p++;
            }
            operations[o] = new MBeanOperationInfo(gOperationInfo.getName(), "no description available", parameters, "java.lang.Object", MBeanOperationInfo.UNKNOWN);
            o++;
        }
View Full Code Here

      //
      MBeanParameterInfo[] parameterInfos = operationInfo.getSignature();
      for (ManagedMethodParameterMetaData parameterMD : parametersMD)
      {
         int i = parameterMD.getIndex();
         MBeanParameterInfo parameterInfo = parameterInfos[i];
         String parameterName = parameterInfo.getName();
         String parameterDescription = operationInfo.getSignature()[i].getDescription();
         if (parameterMD.getName() != null)
         {
            parameterName = parameterMD.getName();
         }
         else if (parameterMD.getDescription() != null)
         {
            parameterDescription = parameterMD.getDescription();
         }
         parameterInfos[i] = new MBeanParameterInfo(parameterName, parameterInfo.getType(), parameterDescription);
      }

      //
      int jmxImpact;
      switch (impactType)
View Full Code Here

   private IspnMBeanOperationInfo toJmxInfo(JmxOperationMetadata operationMetadata) throws ClassNotFoundException {
      JmxOperationParameter[] parameters = operationMetadata.getMethodParameters();
      MBeanParameterInfo[] params = new MBeanParameterInfo[parameters.length];
      for (int i = 0; i < parameters.length; i++) {
         params[i] = new MBeanParameterInfo(parameters[i].getName(), parameters[i].getType(), parameters[i].getDescription());
      }
      return new IspnMBeanOperationInfo(operationMetadata.getMethodName(), operationMetadata.getDescription(), params, operationMetadata.getReturnType(), MBeanOperationInfo.UNKNOWN,
                                        operationMetadata.getOperationName());
   }
View Full Code Here

      //
      MBeanParameterInfo[] parameterInfos = operationInfo.getSignature();
      for (ManagedMethodParameterMetaData parameterMD : parametersMD)
      {
         int i = parameterMD.getIndex();
         MBeanParameterInfo parameterInfo = parameterInfos[i];
         String parameterName = parameterInfo.getName();
         String parameterDescription = operationInfo.getSignature()[i].getDescription();
         if (parameterMD.getName() != null)
         {
            parameterName = parameterMD.getName();
         }
         else if (parameterMD.getDescription() != null)
         {
            parameterDescription = parameterMD.getDescription();
         }
         parameterInfos[i] = new MBeanParameterInfo(parameterName, parameterInfo.getType(), parameterDescription);
      }

      //
      int jmxImpact;
      switch (impactType)
View Full Code Here

     */
    public MBeanParameterInfo createParameterInfo() {

        // Return our cached information (if any)
        if (info == null) {
            info = new MBeanParameterInfo
                (getName(), getType(), getDescription());
        }
        return (MBeanParameterInfo)info;
    }
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, paramMapper);
            fields.setField(Fields.META_TYPE, metaType);


            ManagedParameterImpl mp = new ManagedParameterImpl(fields);
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.