diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 56b1f8416..1c4673f7a 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -167,6 +167,7 @@ public class ServerManager { initCarTrackServer("cartrack"); initMiniFinderServer("minifinder"); initHaicomServer("haicom"); + initEelinkServer("eelink"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1130,4 +1131,16 @@ public class ServerManager { } } + private void initEelinkServer(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, 3, 2)); + pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(ServerManager.this)); + } + }); + } + } + } |