aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-15 11:51:14 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-15 11:51:14 +1300
commita9f5bfb5d69d88ee763c67e8a2f4b4ecc512394b (patch)
tree29baf216a34344288bcad81fe212f4c389638bff /src/org/traccar/ServerManager.java
parent5868e9c00531b7defdfa90d05c1ea8dc987d6011 (diff)
downloadtrackermap-server-a9f5bfb5d69d88ee763c67e8a2f4b4ecc512394b.tar.gz
trackermap-server-a9f5bfb5d69d88ee763c67e8a2f4b4ecc512394b.tar.bz2
trackermap-server-a9f5bfb5d69d88ee763c67e8a2f4b4ecc512394b.zip
Implement Ardi_01 protocol
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 37a5256db..1f1a380e4 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -178,7 +178,8 @@ public class ServerManager {
initRitiServer("riti");
initUlbotechServer("ulbotech");
initTramigoServer("tramigo");
- initTramigoServer("tr900");
+ initTr900Server("tr900");
+ initArdi01Server("ardi01");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1247,4 +1248,17 @@ public class ServerManager {
}
}
+ private void initArdi01Server(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 Ardi01ProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}