/**
* Maak een connector server instantie.
*
* @return connector server
* @throws IOException bij fouten
*/
private JMXConnectorServer createConnectorServer() throws IOException {
final Properties configuration = readConfiguration();
final MBeanServer server = locateMBeanServer();
final JMXServiceURL url = new JMXServiceURL(SimpleJmx.PROTOCOL,
configuration.getProperty("jmx.host", DEFAULT_HOST), Integer.parseInt(configuration.getProperty("jmx.port", DEFAULT_PORT)));
final Map<String,Object> environment = new HashMap<>();
Properties authentication = new Properties();
authentication.setProperty("admin", "admin");
environment.put("jmx.remote.authenticator", new PropertiesAuthenticator(authentication));
environment.put("jmx.remote.accesscontroller", new AllAccessController());
return JMXConnectorServerFactory.newJMXConnectorServer(url, environment, server);
}
JMXAgent.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:OperatieBRP
作者:
评论列表
文章目录