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.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 28a645e51..7e087f263 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -158,6 +158,7 @@ public class ServerManager {
initM2mServer("m2m");
initOsmAndServer("osmand");
initEasyTrackServer("easytrack");
+ initSanavServer("sanav");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1017,5 +1018,18 @@ public class ServerManager {
});
}
}
-
+
+ private void initSanavServer(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 SanavProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}