aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-05-25 12:08:46 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-05-25 12:08:46 +1200
commit36f9cfdee90a4fad82a3e23186fd3d19e01dc025 (patch)
tree59996484c7a7ad5e6bfae38c30791a7d6b1f600d /src/org/traccar/ServerManager.java
parent31884de2de46e689b57c81997d14c6c538f88dde (diff)
downloadtrackermap-server-36f9cfdee90a4fad82a3e23186fd3d19e01dc025.tar.gz
trackermap-server-36f9cfdee90a4fad82a3e23186fd3d19e01dc025.tar.bz2
trackermap-server-36f9cfdee90a4fad82a3e23186fd3d19e01dc025.zip
Implement eeLink 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 56b1f8416..1c4673f7a 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -167,6 +167,7 @@ public class ServerManager {
initCarTrackServer("cartrack");
initMiniFinderServer("minifinder");
initHaicomServer("haicom");
+ initEelinkServer("eelink");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1130,4 +1131,16 @@ public class ServerManager {
}
}
+ private void initEelinkServer(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, 3, 2));
+ pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}