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.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 84933b093..0811a48be 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -142,6 +142,7 @@ public class ServerManager {
initAtrackServer("atrack");
initPt3000Server("pt3000");
initRuptelaServer("ruptela");
+ initTopflytechServer("topflytech");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -870,4 +871,19 @@ public class ServerManager {
}
}
+ private void initTopflytechServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ byte delimiter[] = { (byte) ')' };
+ pipeline.addLast("frameDecoder",
+ new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("objectDecoder", new TopflytechProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}