aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-01-19 22:52:14 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-01-19 22:52:14 +1300
commit44c0dc492306bbd8c0f8cf8a50aa8cba70749602 (patch)
treefcb9546402c0e806d4b3c4d5c4cd337b8dd3e63f /src/org/traccar/ServerManager.java
parentcf58cb80662af0a14f5e9bbb1faaa8915ae23244 (diff)
downloadtrackermap-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.java14
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));
+ }
+ });
+ }
+ }
}