aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-21 12:29:32 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-21 12:29:32 +1300
commitddc9dbefd717b1b037a4397e55dae34bf13598c0 (patch)
treefc4068fd06d68d1d48b7ec9bd158d89dd4d18d9f /src/org/traccar/ServerManager.java
parentda4ff9311bd8573ad0c6aaa04d80c893b4f780e7 (diff)
downloadtrackermap-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.java14
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));
+ }
+ });
+ }
+ }
+
}