diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-24 09:36:04 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-24 09:36:04 +1300 |
commit | e31017a798a2f6404569ab52be60e6f4846db576 (patch) | |
tree | af48a4d62266d09d8e7f42f38eafba43d7fa8692 /src/org/traccar/ServerManager.java | |
parent | d437564381fafb807f61da0d2477e50a5d14d381 (diff) | |
parent | d96638ab083af4134a54536abd00d3810627699d (diff) | |
download | trackermap-server-e31017a798a2f6404569ab52be60e6f4846db576.tar.gz trackermap-server-e31017a798a2f6404569ab52be60e6f4846db576.tar.bz2 trackermap-server-e31017a798a2f6404569ab52be60e6f4846db576.zip |
Merge pull request #1091 from vitalidze/autofon45
Implemented AutoFon 4.5 protocol
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index d7bfb511b..6b46079e9 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -179,6 +179,7 @@ public class ServerManager { initXt013Server("xt013"); initAutoFonServer("autofon"); initGoSafeServer("gosafe"); + initAutoFon45Server("autofon45"); initProtocolDetector(); @@ -1310,4 +1311,15 @@ public class ServerManager { } } + private void initAutoFon45Server(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 AutoFon45FrameDecoder()); + pipeline.addLast("objectDecoder", new AutoFon45ProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } } |