aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-03-19 22:15:35 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-03-19 22:15:35 +1300
commit572dfddfb64f99dbfde60fda628bba327c245465 (patch)
treebd31bb44564b1738ddbfd2d70cf1b3a538e33b7d /src/org/traccar/ServerManager.java
parentd4f33f724b82154e3dd6f8fb8546cbc37b164ba5 (diff)
downloadtraccar-server-572dfddfb64f99dbfde60fda628bba327c245465.tar.gz
traccar-server-572dfddfb64f99dbfde60fda628bba327c245465.tar.bz2
traccar-server-572dfddfb64f99dbfde60fda628bba327c245465.zip
Add Galileo protocol
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 39e6a8330..9416c4183 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -139,6 +139,7 @@ public class ServerManager {
initSyrusServer("syrus");
initVt300Server("vt300");
initCellocatorServer("cellocator");
+ initGalileoServer("galileo");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -732,4 +733,18 @@ public class ServerManager {
}
}
+ private void initGalileoServer(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 GalileoFrameDecoder());
+ pipeline.addLast("objectDecoder", new GalileoProtocolDecoder(ServerManager.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+ }
+
}