aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-12-30 15:38:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-12-30 15:38:35 +1300
commitfaeecdffcf78783ee030d0f9060e1f7656f9f707 (patch)
tree2d6ae3686a71afde0af11ff56b02b68062c2fe5a /src/org/traccar/ServerManager.java
parent2d7a970cc4b49f68b3fbb56d5903bb91b38f3798 (diff)
downloadtrackermap-server-faeecdffcf78783ee030d0f9060e1f7656f9f707.tar.gz
trackermap-server-faeecdffcf78783ee030d0f9060e1f7656f9f707.tar.bz2
trackermap-server-faeecdffcf78783ee030d0f9060e1f7656f9f707.zip
Start Tramigo implementation
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 71b71975e..f6504fd27 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -177,6 +177,7 @@ public class ServerManager {
initOrionServer("orion");
initRitiServer("riti");
initUlbotechServer("ulbotech");
+ initTramigoServer("tramigo");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1273,6 +1274,9 @@ public class ServerManager {
}
private void initUlbotechServer(final String protocol) throws SQLException {
+
+ // TODO: Waiting for feedback from manufacturer
+
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1284,4 +1288,16 @@ public class ServerManager {
}
}
+ private void initTramigoServer(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 LengthFieldBasedFrameDecoder(1024, 6, 2, -8, 0));
+ pipeline.addLast("objectDecoder", new TramigoProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}