aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-02-28 12:09:43 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-02-28 12:09:43 +1300
commit183273d381c132ff657416b6530a193dac157b0d (patch)
tree53b75c2902e3e00a0bc532221d2cab319aa26aab /src/org/traccar/ServerManager.java
parentf872b2072cfd35c51a94efc5b93b91e46129d48e (diff)
downloadtrackermap-server-183273d381c132ff657416b6530a193dac157b0d.tar.gz
trackermap-server-183273d381c132ff657416b6530a193dac157b0d.tar.bz2
trackermap-server-183273d381c132ff657416b6530a193dac157b0d.zip
Begin BCE implementation
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 6b46079e9..f637f8161 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -180,6 +180,7 @@ public class ServerManager {
initAutoFonServer("autofon");
initGoSafeServer("gosafe");
initAutoFon45Server("autofon45");
+ initBceServer("bce");
initProtocolDetector();
@@ -1322,4 +1323,17 @@ public class ServerManager {
});
}
}
+
+ private void initBceServer(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 BceFrameDecoder());
+ pipeline.addLast("objectDecoder", new BceProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}