diff --git a/pom.xml b/pom.xml index ef90983..93e601d 100644 --- a/pom.xml +++ b/pom.xml @@ -10,11 +10,11 @@ 1.0.0-RELEASE - com.loafle - snmp_crawler + com.loafle.overflow + crawler.snmp jar 1.0.0-SNAPSHOT - com.loafle.snmp_crawler + com.loafle.overflow.crawler.snmp @@ -25,7 +25,7 @@ - com.loafle + com.loafle.overflow crawler_java 1.0.0-SNAPSHOT diff --git a/snmp_crawler.iml b/snmp_crawler.iml index 9489d7a..6b03842 100644 --- a/snmp_crawler.iml +++ b/snmp_crawler.iml @@ -14,7 +14,7 @@ - + diff --git a/src/main/java/com/loafle/overflow/crawler/SNMPCrawler.java b/src/main/java/com/loafle/overflow/crawler/snmp/SNMPCrawler.java similarity index 94% rename from src/main/java/com/loafle/overflow/crawler/SNMPCrawler.java rename to src/main/java/com/loafle/overflow/crawler/snmp/SNMPCrawler.java index 8bc949f..c32981e 100644 --- a/src/main/java/com/loafle/overflow/crawler/SNMPCrawler.java +++ b/src/main/java/com/loafle/overflow/crawler/snmp/SNMPCrawler.java @@ -1,5 +1,8 @@ -package com.loafle.overflow.crawler; +package com.loafle.overflow.crawler.snmp; +import com.loafle.overflow.crawler.Crawler; +import com.loafle.overflow.crawler.snmp.version.SNMPv2c; +import com.loafle.overflow.crawler.snmp.version.SNMPv3; import org.snmp4j.Snmp; import org.snmp4j.TransportMapping; import org.snmp4j.smi.Address; @@ -36,7 +39,7 @@ public class SNMPCrawler extends Crawler { } @Override - public Object get(String id) { + protected Object getInternal(Map config) { //return getByV2c(MethodType.VALIDATE, null); //return getByV2c(MethodType.GET, new String[]{"1.3.6.1.2.1.1.5.0", "1.3.6.1.2.1.2.2.1.6.2"}); return getByV2c(MethodType.WALK, new String[]{"1.3.6.1.2.1.25.2.3.1.3"}); diff --git a/src/main/java/com/loafle/overflow/crawler/SNMP.java b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMP.java similarity index 98% rename from src/main/java/com/loafle/overflow/crawler/SNMP.java rename to src/main/java/com/loafle/overflow/crawler/snmp/version/SNMP.java index af4e70d..50f7e68 100644 --- a/src/main/java/com/loafle/overflow/crawler/SNMP.java +++ b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMP.java @@ -1,4 +1,4 @@ -package com.loafle.overflow.crawler; +package com.loafle.overflow.crawler.snmp.version; import org.snmp4j.PDU; import org.snmp4j.Snmp; diff --git a/src/main/java/com/loafle/overflow/crawler/SNMPv2c.java b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv2c.java similarity index 97% rename from src/main/java/com/loafle/overflow/crawler/SNMPv2c.java rename to src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv2c.java index 798f7e5..44d65d6 100644 --- a/src/main/java/com/loafle/overflow/crawler/SNMPv2c.java +++ b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv2c.java @@ -1,4 +1,4 @@ -package com.loafle.overflow.crawler; +package com.loafle.overflow.crawler.snmp.version; /** * Created by insanity on 17. 4. 7. diff --git a/src/main/java/com/loafle/overflow/crawler/SNMPv3.java b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv3.java similarity index 99% rename from src/main/java/com/loafle/overflow/crawler/SNMPv3.java rename to src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv3.java index 1a83103..f6b0896 100644 --- a/src/main/java/com/loafle/overflow/crawler/SNMPv3.java +++ b/src/main/java/com/loafle/overflow/crawler/snmp/version/SNMPv3.java @@ -1,4 +1,4 @@ -package com.loafle.overflow.crawler; +package com.loafle.overflow.crawler.snmp.version; import org.snmp4j.*; import org.snmp4j.mp.MPv3; diff --git a/src/test/java/com/loafle/AppTest.java b/src/test/java/com/loafle/AppTest.java index b3c87dd..dbb57f5 100644 --- a/src/test/java/com/loafle/AppTest.java +++ b/src/test/java/com/loafle/AppTest.java @@ -2,7 +2,7 @@ package com.loafle; import static org.junit.Assert.*; -import com.loafle.overflow.crawler.SNMPCrawler; +import com.loafle.overflow.crawler.snmp.SNMPCrawler; import org.junit.Test; import java.util.Map;