diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 337d177f0..56647aecd 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -169,6 +169,7 @@ public class ServerManager { initHaicomServer("haicom"); initEelinkServer("eelink"); initBoxServer("box"); + initFreedomServer("freedom"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1159,4 +1160,17 @@ public class ServerManager { } } + private void initFreedomServer(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 FreedomProtocolDecoder(ServerManager.this)); + } + }); + } + } + } |