diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-01-19 22:52:14 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-01-19 22:52:14 +1300 |
commit | 44c0dc492306bbd8c0f8cf8a50aa8cba70749602 (patch) | |
tree | fcb9546402c0e806d4b3c4d5c4cd337b8dd3e63f /src/org/traccar/ServerManager.java | |
parent | cf58cb80662af0a14f5e9bbb1faaa8915ae23244 (diff) | |
download | trackermap-server-44c0dc492306bbd8c0f8cf8a50aa8cba70749602.tar.gz trackermap-server-44c0dc492306bbd8c0f8cf8a50aa8cba70749602.tar.bz2 trackermap-server-44c0dc492306bbd8c0f8cf8a50aa8cba70749602.zip |
Add Piligrim protocol
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 8e2465a2b..341e32c3d 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -160,6 +160,7 @@ public class ServerManager { initEasyTrackServer("easytrack"); initTaipServer("taip"); initKhdServer("khd"); + initPiligrimServer("piligrim"); // Initialize web server if (Boolean.valueOf(properties.getProperty("http.enable"))) { @@ -1043,5 +1044,18 @@ public class ServerManager { }); } } + + private void initPiligrimServer(String protocol) throws SQLException { + if (isProtocolEnabled(properties, protocol)) { + serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("httpDecoder", new HttpRequestDecoder()); + pipeline.addLast("httpEncoder", new HttpResponseEncoder()); + pipeline.addLast("objectDecoder", new PiligrimProtocolDecoder(ServerManager.this)); + } + }); + } + } } |