aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-30 23:00:40 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-30 23:00:40 +1300
commitd6c3c4fc1d59c34840f6e77253a2bf1b06ae1908 (patch)
treedc026260edd417a20b45fe089cd9fbbb111696bc /src/org/traccar/ServerManager.java
parent5f1a4ade9054a5958f5bb0815ac0d7a2a65fe6b9 (diff)
downloadtrackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.tar.gz
trackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.tar.bz2
trackermap-server-d6c3c4fc1d59c34840f6e77253a2bf1b06ae1908.zip
Added Navigil protocol (fix #127)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index aa30bab30..ca656af73 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -128,6 +128,7 @@ public class ServerManager {
initGt02Server("gt02");
initGt06Server("gt06");
initMegastekServer("megastek");
+ initNavigilServer("navigil");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -591,4 +592,18 @@ public class ServerManager {
}
}
+ private void initNavigilServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ TrackerServer server = new TrackerServer(this, new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new NavigilFrameDecoder());
+ pipeline.addLast("objectDecoder", new NavigilProtocolDecoder(ServerManager.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+ }
+
}