aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
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 1d6dc633f..448b7685e 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -174,6 +174,7 @@ public class ServerManager {
initTrackboxServer("trackbox");
initVisiontekServer("visiontek");
initOrionServer("orion");
+ initRitiServer("riti");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -1251,4 +1252,18 @@ public class ServerManager {
}
}
+ private void initRitiServer(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 LengthFieldBasedFrameDecoder(1024, 105, 2, 3, 0));
+ pipeline.addLast("objectDecoder", new RitiProtocolDecoder(ServerManager.this));
+ }
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
+ }
+ }
+
}