diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-14 11:25:02 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-02-14 11:25:02 +1300 |
commit | 9f929e8ab59ac4512c695f22fb1f7dc66349c84a (patch) | |
tree | 9bd46b0e818a3008418bfbd7dffba2278eacbab0 /src/org/traccar/ServerManager.java | |
parent | 2e218a2f028959037eec61b7be5c603c325c8545 (diff) | |
download | trackermap-server-9f929e8ab59ac4512c695f22fb1f7dc66349c84a.tar.gz trackermap-server-9f929e8ab59ac4512c695f22fb1f7dc66349c84a.tar.bz2 trackermap-server-9f929e8ab59ac4512c695f22fb1f7dc66349c84a.zip |
Implement GoSafe protocol (fix #1079)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 4d480749d..d7bfb511b 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -178,6 +178,7 @@ public class ServerManager { initArdi01Server("ardi01"); initXt013Server("xt013"); initAutoFonServer("autofon"); + initGoSafeServer("gosafe"); initProtocolDetector(); @@ -1296,4 +1297,17 @@ public class ServerManager { } } + private void initGoSafeServer(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 CharacterDelimiterFrameDecoder(1024, '#')); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new GoSafeProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |