aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
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));
+ }
+ });
+ }
+ }
}