aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-16 22:42:40 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-16 22:42:40 +1200
commit8cf628f7c70d12aeb3f54ad5363114e045863f2e (patch)
tree82d1b833d2890c6b4b186aaad5116e8e86e6a62d /src/org/traccar/ServerManager.java
parent123544ebec47b6d418980ff2da6033de1fe0ea45 (diff)
downloadtrackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.tar.gz
trackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.tar.bz2
trackermap-server-8cf628f7c70d12aeb3f54ad5363114e045863f2e.zip
Added Totem protocol (fix #355)
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 249b34bba..593826553 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -146,6 +146,7 @@ public class ServerManager {
initLaipacServer("laipac");
initAplicomServer("aplicom");
initGotopServer("gotop");
+ initTotemServer("totem");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -930,4 +931,17 @@ public class ServerManager {
}
}
+ private void initTotemServer(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 TotemProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}