diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-24 15:58:59 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-24 15:58:59 +1200 |
commit | c9eb46368a3e8de594ea53770cd5853b5d025966 (patch) | |
tree | 7ee137e6d8dea261f86e5e3fd8baabb43d2d8331 /src/org/traccar/ServerManager.java | |
parent | 8f0c648c6997dc0c83eef536293b40ba112873fa (diff) | |
download | trackermap-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.java | 13 |
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)); + } + }); + } + } + } |