aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-12-24 15:33:04 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-12-24 15:33:04 +1300
commit7dbd8dd192b1d48a8b26168763ecf29d97433319 (patch)
tree2ddbc8bec559ae2bcebf4a5d7f4e95a20c1499c7 /src/org/traccar/ServerManager.java
parent44e8c9ea649d9017621238dab033892b94494ba5 (diff)
downloadtrackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.gz
trackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.tar.bz2
trackermap-server-7dbd8dd192b1d48a8b26168763ecf29d97433319.zip
Initial Ulbotech 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 75a569393..71b71975e 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -176,6 +176,7 @@ public class ServerManager {
initVisiontekServer("visiontek");
initOrionServer("orion");
initRitiServer("riti");
+ initUlbotechServer("ulbotech");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1271,4 +1272,16 @@ public class ServerManager {
}
}
+ private void initUlbotechServer(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 LengthFieldBasedFrameDecoder(1024, 2, 1, 2, 0));
+ pipeline.addLast("objectDecoder", new UlbotechProtocolDecoder(dataManager, protocol, properties));
+ }
+ });
+ }
+ }
+
}