javax.management.MBeanOperationInfo#ACTION_INFO源码实例Demo

下面列出了javax.management.MBeanOperationInfo#ACTION_INFO 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码2 项目: TencentKona-8   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码3 项目: jdk8u60   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码4 项目: openjdk-jdk8u   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码6 项目: openjdk-jdk9   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码7 项目: jdk8u-jdk   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码8 项目: hottub   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码9 项目: openjdk-8-source   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码10 项目: gemfirexd-oss   文件: MemberInfoWithStatsMBean.java
/**
 * Returns operations defined for this MBean as an array of 
 * MBeanOperationInfo objects.
 * 
 * @return operations defined as an array of MBeanOperationInfo objects. 
 */
@Override
protected MBeanOperationInfo[] createMBeanOperationInfo() {
  MBeanOperationInfo[] operationsInfo = new MBeanOperationInfo[MAX_OPERATIONS_COUNT];
  
  operationsInfo[0] = new MBeanOperationInfo("getMembers", 
                                             "Returns ids as strings for all the members - Application Peers & Cache Servers.", 
                                             new MBeanParameterInfo[] {}, 
                                             String[].class.getName(), 
                                             MBeanOperationInfo.ACTION_INFO);
  
  MBeanParameterInfo[] getMemberDetailsArgs = new MBeanParameterInfo[1];
  getMemberDetailsArgs[0] = new MBeanParameterInfo("memberId", String.class.getName(), "Id of the member for all the details are to be retrieved.");
  operationsInfo[1] = new MBeanOperationInfo("getMemberDetails", 
                                              "Returns details for a given member", 
                                              getMemberDetailsArgs, 
                                              Map.class.getName(), 
                                              MBeanOperationInfo.ACTION_INFO);
  
  /* For retrieving ObjectNames of existing Region MBeans, MBeanServerConnection.queryMBeans(), could be called */
  MBeanParameterInfo[] getRegionSnapArgs = new MBeanParameterInfo[1];
  getRegionSnapArgs[0] = new MBeanParameterInfo("memberId", String.class.getName(), "Id of the member on which we want to discover all the region MBean.");
  operationsInfo[2] = new MBeanOperationInfo("getRegions", 
                                              "Returns a java.util.Map of details of regions on a member", 
                                              getRegionSnapArgs, 
                                              Map.class.getName(), 
                                              MBeanOperationInfo.ACTION_INFO);

  
  return operationsInfo;
}
 
源代码11 项目: openjdk-8   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码12 项目: jdk8u_jdk   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码13 项目: gemfirexd-oss   文件: MemberInfoWithStatsMBean.java
/**
 * Returns operations defined for this MBean as an array of 
 * MBeanOperationInfo objects.
 * 
 * @return operations defined as an array of MBeanOperationInfo objects. 
 */
@Override
protected MBeanOperationInfo[] createMBeanOperationInfo() {
  MBeanOperationInfo[] operationsInfo = new MBeanOperationInfo[MAX_OPERATIONS_COUNT];
  
  operationsInfo[0] = new MBeanOperationInfo("getMembers", 
                                             "Returns ids as strings for all the members - Application Peers & Cache Servers.", 
                                             new MBeanParameterInfo[] {}, 
                                             String[].class.getName(), 
                                             MBeanOperationInfo.ACTION_INFO);
  
  MBeanParameterInfo[] getMemberDetailsArgs = new MBeanParameterInfo[1];
  getMemberDetailsArgs[0] = new MBeanParameterInfo("memberId", String.class.getName(), "Id of the member for all the details are to be retrieved.");
  operationsInfo[1] = new MBeanOperationInfo("getMemberDetails", 
                                              "Returns details for a given member", 
                                              getMemberDetailsArgs, 
                                              Map.class.getName(), 
                                              MBeanOperationInfo.ACTION_INFO);
  
  /* For retrieving ObjectNames of existing Region MBeans, MBeanServerConnection.queryMBeans(), could be called */
  MBeanParameterInfo[] getRegionSnapArgs = new MBeanParameterInfo[1];
  getRegionSnapArgs[0] = new MBeanParameterInfo("memberId", String.class.getName(), "Id of the member on which we want to discover all the region MBean.");
  operationsInfo[2] = new MBeanOperationInfo("getRegions", 
                                              "Returns a java.util.Map of details of regions on a member", 
                                              getRegionSnapArgs, 
                                              Map.class.getName(), 
                                              MBeanOperationInfo.ACTION_INFO);

  
  return operationsInfo;
}
 
源代码14 项目: jdk8u-jdk   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码15 项目: jdk8u-dev-jdk   文件: MustBeValidCommand.java
static private MBeanOperationInfo[] makeOpInfos(String[][] spec) {
    final MBeanOperationInfo[] result =
        new MBeanOperationInfo[spec.length];
    final MBeanParameterInfo[] pars = makeParInfos(parameters);
    for (int i=0;i<result.length;i++) {
        System.out.println("\tCreate an MBeanOperationInfo: " +
                           spec[i][0]);
        final MBeanOperationInfo item =
            new MBeanOperationInfo(spec[i][2],spec[i][0],pars,spec[i][1],
                                   MBeanOperationInfo.ACTION_INFO);
        result[i]=item;
    }
    return result;
}
 
源代码16 项目: wildfly-core   文件: Dynamic.java
@Override
public MBeanInfo getMBeanInfo() {
    return new MBeanInfo(
            Dynamic.class.getName(), "MBean for RBAC testing of JMX non-core MBeans", null, null,
            new MBeanOperationInfo[] {
                    new MBeanOperationInfo("helloReadOnly", "helloReadOnly", null, "void", MBeanOperationInfo.INFO),
                    new MBeanOperationInfo("helloWriteOnly", "helloWriteOnly", null, "void", MBeanOperationInfo.ACTION),
                    new MBeanOperationInfo("helloReadWrite", "helloReadWrite", null, "void", MBeanOperationInfo.ACTION_INFO),
                    new MBeanOperationInfo("helloUnknown", "helloUnknown", null, "void", MBeanOperationInfo.UNKNOWN)
            },
            null, null
    );
}
 
源代码17 项目: text-ui   文件: MBeanInfoRenderer.java
@Override
public LineRenderer renderer(Iterator<MBeanInfo> stream) {

  List<LineRenderer> renderers = new ArrayList<LineRenderer>();

  while (stream.hasNext()) {
    MBeanInfo info = stream.next();

    //
    TreeElement root = new TreeElement(info.getClassName());

    // Descriptor
    TableElement descriptor = new TableElement().
        overflow(Overflow.HIDDEN).
        rightCellPadding(1);
    Descriptor descriptorInfo = info.getDescriptor();
    if (descriptorInfo != null) {
      for (String fieldName : descriptorInfo.getFieldNames()) {
        String fieldValue = String.valueOf(descriptorInfo.getFieldValue(fieldName));
        descriptor.row(fieldName, fieldValue);
      }
    }

    // Attributes
    TableElement attributes = new TableElement().
        overflow(Overflow.HIDDEN).
        rightCellPadding(1).
        add(new RowElement().style(Decoration.bold.fg(Color.black).bg(Color.white)).add("NAME", "TYPE", "DESCRIPTION"));
    for (MBeanAttributeInfo attributeInfo : info.getAttributes()) {
      attributes.row(attributeInfo.getName(), attributeInfo.getType(), attributeInfo.getDescription());
    }

    // Operations
    TreeElement operations = new TreeElement("Operations");
    for (MBeanOperationInfo operationInfo : info.getOperations()) {
      TableElement signature = new TableElement().
          overflow(Overflow.HIDDEN).
          rightCellPadding(1);
      MBeanParameterInfo[] parameterInfos = operationInfo.getSignature();
      for (MBeanParameterInfo parameterInfo : parameterInfos) {
        signature.row(parameterInfo.getName(), parameterInfo.getType(), parameterInfo.getDescription());
      }
      TreeElement operation = new TreeElement(operationInfo.getName());
      String impact;
      switch (operationInfo.getImpact()) {
        case MBeanOperationInfo.ACTION:
          impact = "ACTION";
          break;
        case MBeanOperationInfo.INFO:
          impact = "INFO";
          break;
        case MBeanOperationInfo.ACTION_INFO:
          impact = "ACTION_INFO";
          break;
        default:
          impact = "UNKNOWN";
      }
      operation.addChild(new TableElement().
          add(
              new RowElement().add("Type: ", operationInfo.getReturnType()),
              new RowElement().add("Description: ", operationInfo.getDescription()),
              new RowElement().add("Impact: ", impact),
              new RowElement().add(new LabelElement("Signature: "), signature)
          )
      );

      operations.addChild(operation);
    }

    //
    root.addChild(
      new TableElement().leftCellPadding(1).overflow(Overflow.HIDDEN).
        row("ClassName", info.getClassName()).
        row("Description", info.getDescription()
      )
    );
    root.addChild(new TreeElement("Descriptor").addChild(descriptor));
    root.addChild(new TreeElement("Attributes").addChild(attributes));
    root.addChild(operations);

    //
    renderers.add(root.renderer());
  }




  return LineRenderer.vertical(renderers);
}