This commit is contained in:
jackdaw@loafle.com 2017-04-14 11:00:45 +09:00
parent 57beece37a
commit 696921c48d

View File

@ -1,6 +1,7 @@
package com.loafle.overflow.crawler.jmx;
import com.loafle.overflow.crawler.Crawler;
import com.loafle.overflow.crawler.config.Config;
import javax.management.*;
import javax.management.openmbean.CompositeData;
@ -36,7 +37,7 @@ public class JmxCrawler extends Crawler{
private List<Object> result = new ArrayList<>();
@Override
public Object getInternal(Map<String, Object> map) throws Exception {
public Object getInternal(Config config) throws Exception {
MBeanReceiver m = new MBeanReceiver() {
@Override
@ -47,20 +48,20 @@ public class JmxCrawler extends Crawler{
}
};
String jmxUrl = (String) map.get("jmxUrl");
String username = (String)map.get("username");
String password = (String)map.get("password");
Boolean isSSL = (Boolean)map.get("ssl");
JmxCrawler jmxCrawler = new JmxCrawler(
jmxUrl,
username,
password,
isSSL,
m
);
jmxCrawler.doCrawler();
// String jmxUrl = (String) map.get("jmxUrl");
// String username = (String)map.get("username");
// String password = (String)map.get("password");
// Boolean isSSL = (Boolean)map.get("ssl");
//
// JmxCrawler jmxCrawler = new JmxCrawler(
// jmxUrl,
// username,
// password,
// isSSL,
// m
// );
//
// jmxCrawler.doCrawler();
return result;
}