diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 12:29:32 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-01-21 12:29:32 +1300 |
commit | ddc9dbefd717b1b037a4397e55dae34bf13598c0 (patch) | |
tree | fc4068fd06d68d1d48b7ec9bd158d89dd4d18d9f /src/org/traccar/ServerManager.java | |
parent | da4ff9311bd8573ad0c6aaa04d80c893b4f780e7 (diff) | |
download | trackermap-server-ddc9dbefd717b1b037a4397e55dae34bf13598c0.tar.gz trackermap-server-ddc9dbefd717b1b037a4397e55dae34bf13598c0.tar.bz2 trackermap-server-ddc9dbefd717b1b037a4397e55dae34bf13598c0.zip |
Implement XT013 support (fix #1035)
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 6afd214a3..88a443a24 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -176,6 +176,7 @@ public class ServerManager { initTramigoServer("tramigo"); initTr900Server("tr900"); initArdi01Server("ardi01"); + initXt013Server("xt013"); initProtocolDetector(); @@ -1269,4 +1270,17 @@ public class ServerManager { } } + private void initXt013Server(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 LineBasedFrameDecoder(1024)); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new Xt013ProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |