aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-01-21 13:30:01 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-01-21 13:30:01 +1300
commitd2cc0c9370fd9713e674f0f8622d35296f041d17 (patch)
tree29cc3234f3a6e6826b004f713278e3c74ee2f26e /src/org/traccar/ServerManager.java
parentddc9dbefd717b1b037a4397e55dae34bf13598c0 (diff)
downloadtrackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.gz
trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.tar.bz2
trackermap-server-d2cc0c9370fd9713e674f0f8622d35296f041d17.zip
Begin AutoFon protocol implementation
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));
+ }
+ });
+ }
+ }
+
}