org.apache.tomcat.util.modeler.Registry.getMethodInfo()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中org.apache.tomcat.util.modeler.Registry.getMethodInfo方法的一些代码示例,展示了Registry.getMethodInfo的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.getMethodInfo方法的具体详情如下:
包路径:org.apache.tomcat.util.modeler.Registry
类名称:Registry
方法名:getMethodInfo

Registry.getMethodInfo介绍

[英]Find the operation info for a method
[中]查找方法的操作信息

代码示例

代码示例来源:origin: jboss.web/jbossweb

continue;
if( getMethodInfo(oN, operation) == null) {
  continue;

代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote

continue;
if(getMethodInfo(current, operation) == null) {
  continue;

代码示例来源:origin: codefollower/Tomcat-Research

continue;
if(getMethodInfo(current, operation) == null) {
  continue;

代码示例来源:origin: org.apache.geronimo.ext.tomcat/util

continue;
if(getMethodInfo(current, operation) == null) {
  continue;

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

continue;
if(getMethodInfo(current, operation) == null) {
  continue;

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

continue;
if (getMethodInfo(current, operation) == null) {
  continue;

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

continue;
if( getMethodInfo(oN, operation) == null) {
  continue;

代码示例来源:origin: org.jboss.web/jbossweb

continue;
if( getMethodInfo(oN, operation) == null) {
  continue;

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

private void invokeOperation(PrintWriter writer, String onameStr, String op,
    String[] valuesStr) {
  try {
    ObjectName oname=new ObjectName( onameStr );
    MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,op);
    MBeanParameterInfo[] signature = methodInfo.getSignature();
    String[] signatureTypes = new String[signature.length];
    Object[] values = new Object[signature.length];
    for (int i = 0; i < signature.length; i++) {
      MBeanParameterInfo pi = signature[i];
      signatureTypes[i] = pi.getType();
      values[i] = registry.convertValue(pi.getType(), valuesStr[i] );
    }
    Object retVal = mBeanServer.invoke(oname,op,values,signatureTypes);
    if (retVal != null) {
      writer.println("OK - Operation " + op + " returned:");
      output("", writer, retVal);
    } else {
      writer.println("OK - Operation " + op + " without return value");
    }
  } catch( Exception ex ) {
    writer.println("Error - " + ex.toString());
    ex.printStackTrace(writer);
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Invokes an operation on an MBean.
 *
 * @param onameStr The name of the MBean.
 * @param operation The name of the operation to invoke.
 * @param parameters An array of Strings containing the parameters to the
 *            operation. They will be converted to the appropriate types to
 *            call the requested operation.
 * @return The value returned by the requested operation.
 */
private Object invokeOperationInternal(String onameStr, String operation, String[] parameters)
    throws OperationsException, MBeanException, ReflectionException {
  ObjectName oname = new ObjectName(onameStr);
  MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation);
  MBeanParameterInfo[] signature = methodInfo.getSignature();
  String[] signatureTypes = new String[signature.length];
  Object[] values = new Object[signature.length];
  for (int i = 0; i < signature.length; i++) {
    MBeanParameterInfo pi = signature[i];
    signatureTypes[i] = pi.getType();
    values[i] = registry.convertValue(pi.getType(), parameters[i]);
  }
  return mBeanServer.invoke(oname, operation, values, signatureTypes);
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Invokes an operation on an MBean.
 * @param onameStr The name of the MBean.
 * @param operation The name of the operation to invoke.
 * @param parameters An array of Strings containing the parameters to the
 *                   operation. They will be converted to the appropriate
 *                   types to call the reuested operation.
 * @return The value returned by the requested operation.
 */
private Object invokeOperationInternal(String onameStr,
                    String operation,
                    String[] parameters)
  throws OperationsException, MBeanException, ReflectionException {
  ObjectName oname=new ObjectName( onameStr );
  MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,operation);
  MBeanParameterInfo[] signature = methodInfo.getSignature();
  String[] signatureTypes = new String[signature.length];
  Object[] values = new Object[signature.length];
  for (int i = 0; i < signature.length; i++) {
    MBeanParameterInfo pi = signature[i];
    signatureTypes[i] = pi.getType();
    values[i] = registry.convertValue(pi.getType(), parameters[i] );
   }
  return mBeanServer.invoke(oname,operation,values,signatureTypes);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Invokes an operation on an MBean.
 *
 * @param onameStr The name of the MBean.
 * @param operation The name of the operation to invoke.
 * @param parameters An array of Strings containing the parameters to the
 *            operation. They will be converted to the appropriate types to
 *            call the requested operation.
 * @return The value returned by the requested operation.
 */
private Object invokeOperationInternal(String onameStr, String operation, String[] parameters)
    throws OperationsException, MBeanException, ReflectionException {
  ObjectName oname = new ObjectName(onameStr);
  MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation);
  MBeanParameterInfo[] signature = methodInfo.getSignature();
  String[] signatureTypes = new String[signature.length];
  Object[] values = new Object[signature.length];
  for (int i = 0; i < signature.length; i++) {
    MBeanParameterInfo pi = signature[i];
    signatureTypes[i] = pi.getType();
    values[i] = registry.convertValue(pi.getType(), parameters[i]);
  }
  return mBeanServer.invoke(oname, operation, values, signatureTypes);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * Invokes an operation on an MBean.
 * @param onameStr The name of the MBean.
 * @param operation The name of the operation to invoke.
 * @param parameters An array of Strings containing the parameters to the
 *                   operation. They will be converted to the appropriate
 *                   types to call the reuested operation.
 * @return The value returned by the requested operation.
 */
private Object invokeOperationInternal(String onameStr,
                    String operation,
                    String[] parameters)
  throws OperationsException, MBeanException, ReflectionException {
  ObjectName oname=new ObjectName( onameStr );
  MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,operation);
  MBeanParameterInfo[] signature = methodInfo.getSignature();
  String[] signatureTypes = new String[signature.length];
  Object[] values = new Object[signature.length];
  for (int i = 0; i < signature.length; i++) {
    MBeanParameterInfo pi = signature[i];
    signatureTypes[i] = pi.getType();
    values[i] = registry.convertValue(pi.getType(), parameters[i] );
   }
  return mBeanServer.invoke(oname,operation,values,signatureTypes);
}

相关文章