aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-24 15:58:59 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-24 15:58:59 +1200
commitc9eb46368a3e8de594ea53770cd5853b5d025966 (patch)
tree7ee137e6d8dea261f86e5e3fd8baabb43d2d8331 /src/org/traccar/ServerManager.java
parent8f0c648c6997dc0c83eef536293b40ba112873fa (diff)
downloadtrackermap-server-c9eb46368a3e8de594ea53770cd5853b5d025966.tar.gz
trackermap-server-c9eb46368a3e8de594ea53770cd5853b5d025966.tar.bz2
trackermap-server-c9eb46368a3e8de594ea53770cd5853b5d025966.zip
Add AVL301 protocol support
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 4c9645e41..5e549b177 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -124,6 +124,7 @@ public class ServerManager {
initCalAmpServer("calamp");
initMtxServer("mtx");
initTytanServer("tytan");
+ initAvl301Server("avl301");
initProtocolDetector();
}
@@ -1303,4 +1304,16 @@ public class ServerManager {
}
}
+ private void initAvl301Server(final String protocol) throws SQLException {
+ if (isProtocolEnabled(protocol)) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(256, 2, 1, 2, 0));
+ pipeline.addLast("objectDecoder", new Avl301ProtocolDecoder(protocol));
+ }
+ });
+ }
+ }
+
}