diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 13:30:01 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 13:30:01 +1300 |
commit | d2cc0c9370fd9713e674f0f8622d35296f041d17 (patch) | |
tree | 29cc3234f3a6e6826b004f713278e3c74ee2f26e /src/org/traccar/ServerManager.java | |
parent | ddc9dbefd717b1b037a4397e55dae34bf13598c0 (diff) | |
download | trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.gz trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.bz2 trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.zip |
Begin AutoFon protocol implementation
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 88a443a24..abda51787 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -177,6 +177,7 @@ public class ServerManager { initTr900Server("tr900"); initArdi01Server("ardi01"); initXt013Server("xt013"); + initAutoFonServer("autofon"); initProtocolDetector(); @@ -1283,4 +1284,16 @@ public class ServerManager { } } + private void initAutoFonServer(final String protocol) throws SQLException { + if (isProtocolEnabled(properties, protocol)) { + serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("frameDecoder", new AutoFonFrameDecoder()); + pipeline.addLast("objectDecoder", new AutoFonProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |