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 4d480749d..d7bfb511b 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -178,6 +178,7 @@ public class ServerManager {
initArdi01Server("ardi01");
initXt013Server("xt013");
initAutoFonServer("autofon");
+ initGoSafeServer("gosafe");
initProtocolDetector();
@@ -1296,4 +1297,17 @@ public class ServerManager {
}
}
+ private void initGoSafeServer(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 CharacterDelimiterFrameDecoder(1024, '#'));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new GoSafeProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}