aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:56:19 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:56:19 +1300
commit27b76e26e7f438976e6702c9f3c71be93f68fa52 (patch)
tree31eff062934a199e644c613894410a276d98cbc9 /src/org/traccar/ServerManager.java
parent4eee2d3db43dd7154e0de499b89be90c8f59a383 (diff)
downloadtrackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.tar.gz
trackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.tar.bz2
trackermap-server-27b76e26e7f438976e6702c9f3c71be93f68fa52.zip
Merge AVL08 and Totem protocols
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 771ea6480..32afc29fc 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -108,7 +108,7 @@ public class ServerManager {
initGl200Server("gl200");
initT55Server("t55");
initXexun2Server("xexun2");
- initAvl08Server("avl08");
+ initTotemServer("totem");
initEnforaServer("enfora");
initMeiligaoServer("meiligao");
initMaxonServer("maxon");
@@ -152,7 +152,6 @@ public class ServerManager {
initLaipacServer("laipac");
initAplicomServer("aplicom");
initGotopServer("gotop");
- initTotemServer("totem");
initGatorServer("gator");
initNoranServer("noran");
initM2mServer("m2m");
@@ -322,16 +321,14 @@ public class ServerManager {
}
}
- private void initAvl08Server(String protocol) throws SQLException {
+ private void initTotemServer(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) '\r', (byte) '\n' };
- pipeline.addLast("frameDecoder",
- new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
+ pipeline.addLast("frameDecoder", new TotemFrameDecoder());
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new Avl08ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new TotemProtocolDecoder(ServerManager.this));
}
});
}
@@ -944,19 +941,6 @@ public class ServerManager {
}
}
- private void initTotemServer(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 TotemFrameDecoder());
- pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new TotemProtocolDecoder(ServerManager.this));
- }
- });
- }
- }
-
private void initGatorServer(String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {