MBean.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:TayzGrid 作者:
public Object invoke(String actionName, Object[] params, String[] argTypes)
        throws MBeanException, ReflectionException
{
    assertNotNull("actionName", actionName);

    // params argTypes are allowed to be null and mean no-arg method
    if (params == null) {
        params = NO_PARAMS;
    }
    if (argTypes == null) {
        argTypes = NO_ARGS;
    }

    for (int i = 0; i < argTypes.length; i++) {
        assertNotNull("argTypes[" + i + "]", argTypes[i]);
    }

    Signature signature = new Signature(actionName, argTypes);
    MBeanOperation operation = operations.get(signature);
    if (operation == null) {
        String message = "Operation " + signature + " not found";
        throw new MBeanException(new ServiceNotFoundException(message), message);
    }

    Object result = operation.invoke(params);
    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号