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.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 88a443a24..abda51787 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -177,6 +177,7 @@ public class ServerManager {
initTr900Server("tr900");
initArdi01Server("ardi01");
initXt013Server("xt013");
+ initAutoFonServer("autofon");
initProtocolDetector();
@@ -1283,4 +1284,16 @@ public class ServerManager {
}
}
+ private void initAutoFonServer(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 AutoFonFrameDecoder());
+ pipeline.addLast("objectDecoder", new AutoFonProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}