diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 16 |
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)); + } + }); + } + } + } |