aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-11 01:38:22 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-11 01:38:22 +1200
commitc72c0b15ea8cfd0d2642e05af94a876fe525e447 (patch)
treeb9d39e8597e1d9f672f27d06fdb8a2b2ec3b77fb /src/org/traccar/ServerManager.java
parent4c315abb231562bd90ccd97c8db945dde9ee80c9 (diff)
downloadtrackermap-server-c72c0b15ea8cfd0d2642e05af94a876fe525e447.tar.gz
trackermap-server-c72c0b15ea8cfd0d2642e05af94a876fe525e447.tar.bz2
trackermap-server-c72c0b15ea8cfd0d2642e05af94a876fe525e447.zip
Implement Aplicom protocol (fix #202)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 0811a48be..f66eda351 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -143,6 +143,8 @@ public class ServerManager {
initPt3000Server("pt3000");
initRuptelaServer("ruptela");
initTopflytechServer("topflytech");
+ //initLaipacServer("laipac");
+ initAplicomServer("aplicom");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -754,7 +756,7 @@ public class ServerManager {
});
}
}
-
+
private void initWialonServer(String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@@ -886,4 +888,30 @@ public class ServerManager {
}
}
+ /*private void initLaipacServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
+ pipeline.addLast("stringDecoder", new StringDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectDecoder", new LaipacProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }*/
+
+ private void initAplicomServer(String protocol) throws SQLException {
+ if (isProtocolEnabled(properties, protocol)) {
+ serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
+ @Override
+ protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new AplicomFrameDecoder());
+ pipeline.addLast("objectDecoder", new AplicomProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
}