diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 37a5256db..1f1a380e4 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -178,7 +178,8 @@ public class ServerManager { initRitiServer("riti"); initUlbotechServer("ulbotech"); initTramigoServer("tramigo"); - initTramigoServer("tr900"); + initTr900Server("tr900"); + initArdi01Server("ardi01"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1247,4 +1248,17 @@ public class ServerManager { } } + private void initArdi01Server(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 LineBasedFrameDecoder(1024)); + pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectDecoder", new Ardi01ProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |