aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-06 22:18:45 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-06 22:18:45 +1200
commitc10858c1ae7f4dca0c9ae88e19bb069b91ad0792 (patch)
tree1334c6cd825a4622055bb14d8fbf8f67018b4799 /src/org/traccar/ServerManager.java
parent5060907d594f54287e9cbd402c1d8804151fcede (diff)
downloadtrackermap-server-c10858c1ae7f4dca0c9ae88e19bb069b91ad0792.tar.gz
trackermap-server-c10858c1ae7f4dca0c9ae88e19bb069b91ad0792.tar.bz2
trackermap-server-c10858c1ae7f4dca0c9ae88e19bb069b91ad0792.zip
Added Ruptela protocol
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 4432ad07c..84933b093 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -141,6 +141,7 @@ public class ServerManager {
initGlobalSatServer("globalsat");
initAtrackServer("atrack");
initPt3000Server("pt3000");
+ initRuptelaServer("ruptela");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -857,4 +858,16 @@ public class ServerManager {
}
}
+ private void initRuptelaServer(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, 0, 2, 2, 0));
+ pipeline.addLast("objectDecoder", new RuptelaProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}