/**
* Connects to the JMX agent in the local process.
*
* @throws ConnectionFailedException if there was a failure to connect to the local JMX connector
* in the process
* @throws IOException if the JDK management agent cannot be found and loaded
*/
private void connect() throws ConnectionFailedException, IOException {
try {
final JMXServiceURL jmxUrl = getJMXServiceURL();
this.jmxc = JMXConnectorFactory.connect(jmxUrl);
this.server = this.jmxc.getMBeanServerConnection();
} catch (AttachNotSupportedException e) {
throw new ConnectionFailedException("Failed to connect to process '" + this.pid + "'", e);
}
}
MBeanProcessController.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:monarch
作者:
评论列表
文章目录