JMXAccessorGetTask.java 文件源码

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

项目:lazycat 作者:
/**
 * @param jmxServerConnection
 * @param name
 * @return The value of the given named attribute
 * @throws Exception
 */
protected String jmxGet(MBeanServerConnection jmxServerConnection, String name) throws Exception {
    String error = null;
    if (isEcho()) {
        handleOutput("MBean " + name + " get attribute " + attribute);
    }
    Object result = jmxServerConnection.getAttribute(new ObjectName(name), attribute);
    if (result != null) {
        echoResult(attribute, result);
        createProperty(result);
    } else
        error = "Attribute " + attribute + " is empty";
    return error;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号