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 6afd214a3..88a443a24 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -176,6 +176,7 @@ public class ServerManager { initTramigoServer("tramigo"); initTr900Server("tr900"); initArdi01Server("ardi01"); + initXt013Server("xt013"); initProtocolDetector(); @@ -1269,4 +1270,17 @@ public class ServerManager { } } + private void initXt013Server(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 Xt013ProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |