diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-12-24 15:33:04 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-12-24 15:33:04 +1300 |
commit | 7dbd8dd192b1d48a8b26168763ecf29d97433319 (patch) | |
tree | 2ddbc8bec559ae2bcebf4a5d7f4e95a20c1499c7 /src/org/traccar/ServerManager.java | |
parent | 44e8c9ea649d9017621238dab033892b94494ba5 (diff) | |
download | trackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.gz trackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.bz2 trackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.zip |
Initial Ulbotech implementation
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 75a569393..71b71975e 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -176,6 +176,7 @@ public class ServerManager { initVisiontekServer("visiontek"); initOrionServer("orion"); initRitiServer("riti"); + initUlbotechServer("ulbotech"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1271,4 +1272,16 @@ public class ServerManager { } } + private void initUlbotechServer(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 LengthFieldBasedFrameDecoder(1024, 2, 1, 2, 0)); + pipeline.addLast("objectDecoder", new UlbotechProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } + } |