diff options
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 55e4e4eeb..465ef3d8e 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -151,6 +151,7 @@ public class ServerManager { initManPowerServer("manpower"); initGlobalSatServer("globalsat"); initAtrackServer("atrack"); + initPt3000Server("pt3000"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -904,4 +905,18 @@ public class ServerManager { } } + private void initPt3000Server(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("stringEncoder", new StringEncoder()); + pipeline.addLast("objectDecoder", new Pt3000ProtocolDecoder(ServerManager.this)); + } + }); + } + } + } |