aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
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));
+ }
+ });
+ }
+ }
+
}