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 56647aecd..653d74a73 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -170,6 +170,7 @@ public class ServerManager { initEelinkServer("eelink"); initBoxServer("box"); initFreedomServer("freedom"); + initTelikServer("telik"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1173,4 +1174,19 @@ public class ServerManager { } } + private void initTelikServer(String protocol) throws SQLException { + if (isProtocolEnabled(properties, protocol)) { + serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + byte delimiter[] = { (byte) '\0' }; + pipeline.addLast("frameDecoder", + new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter))); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new TelikProtocolDecoder(ServerManager.this)); + } + }); + } + } + } |