JmxReporter.java 文件源码

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

项目:tqdev-metrics 作者:
@Override
public AttributeList getAttributes(String[] attributeNames) {

    if (attributeNames == null) {
        throw new RuntimeOperationsException(new IllegalArgumentException("attributeNames[] cannot be null"),
                "Cannot call getAttributes with null attribute names");
    }
    AttributeList resultList = new AttributeList();

    if (attributeNames.length == 0) {
        return resultList;
    }

    for (String attributeName : attributeNames) {
        try {
            Object value = getAttribute(attributeName);
            resultList.add(new Attribute(attributeName, value));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    return (resultList);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号