add crawlers
This commit is contained in:
parent
d93049fad8
commit
d9019cc150
|
@ -3,6 +3,11 @@ package com.loafle.overflow.rpc.api;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.googlecode.jsonrpc4j.spring.AutoJsonRpcServiceImpl;
|
||||
import com.loafle.overflow.crawler.Crawler;
|
||||
import com.loafle.overflow.crawler.mongo.MongoCrawler;
|
||||
import com.loafle.overflow.crawler.redis.RedisCralwer;
|
||||
import com.loafle.overflow.crawler.snmp.SNMPCrawler;
|
||||
import com.loafle.overflow.crawler.sql.SQLCrawler;
|
||||
import com.loafle.overflow.crawler.wmi.WMICrawler;
|
||||
import com.loafle.overflow.rpc.model.Input;
|
||||
import com.loafle.overflow.rpc.model.Output;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -17,6 +22,20 @@ public class RemoteImpl implements Remote {
|
|||
|
||||
private Map<String, Crawler> crawlerMap = null;
|
||||
|
||||
public RemoteImpl() {
|
||||
crawlerMap = new HashMap<String, Crawler>();
|
||||
|
||||
addDelegate("SQL",new SQLCrawler());
|
||||
addDelegate("SNMP",new SNMPCrawler());
|
||||
addDelegate("REDIS",new RedisCralwer());
|
||||
addDelegate("MONGO",new MongoCrawler());
|
||||
addDelegate("WMI",new WMICrawler());
|
||||
//addDelegate("JMX",new JMXCrawler());
|
||||
}
|
||||
|
||||
public Crawler getCrawler(String id) {
|
||||
return crawlerMap.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Output init(Input input) throws Exception {
|
||||
|
|
Loading…
Reference in New Issue
Block a user