aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-08-27 22:12:39 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-08-27 22:12:39 +1200
commit2ba8c5218542ff71ff4087ddaefffa0fb572024d (patch)
treed8f1c605bdc6ba863d16f2444862691fbbc3c43c /src/org/traccar/ServerManager.java
parent6522fd1027e086c2708757792f2c8e44d4597908 (diff)
downloadtrackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.tar.gz
trackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.tar.bz2
trackermap-server-2ba8c5218542ff71ff4087ddaefffa0fb572024d.zip
Start Orion implementation
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 c262de360..8845df738 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -173,6 +173,7 @@ public class ServerManager {
initTelikServer("telik");
initTrackboxServer("trackbox");
initVisiontekServer("visiontek");
+ initOrionServer("orion");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1220,4 +1221,18 @@ public class ServerManager {
}
}
+ private void initOrionServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ TrackerServer server = new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new OrionFrameDecoder());
+ pipeline.addLast("objectDecoder", new OrionProtocolDecoder(ServerManager.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+ }
+
}