aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 12:50:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 12:50:45 +1300
commit9a33a3ae6c50b505bfe22596ae4e68b6b0ed57d0 (patch)
treeb5897462dd8253f409144d817fb96ab827fd240d
parent27b76e26e7f438976e6702c9f3c71be93f68fa52 (diff)
downloadtrackermap-server-9a33a3ae6c50b505bfe22596ae4e68b6b0ed57d0.tar.gz
trackermap-server-9a33a3ae6c50b505bfe22596ae4e68b6b0ed57d0.tar.bz2
trackermap-server-9a33a3ae6c50b505bfe22596ae4e68b6b0ed57d0.zip
Change server init order
-rw-r--r--src/org/traccar/ServerManager.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 32afc29fc..daa2981b6 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -152,12 +152,12 @@ public class ServerManager {
initLaipacServer("laipac");
initAplicomServer("aplicom");
initGotopServer("gotop");
+ initSanavServer("sanav");
initGatorServer("gator");
initNoranServer("noran");
initM2mServer("m2m");
initOsmAndServer("osmand");
initEasyTrackServer("easytrack");
- initSanavServer("sanav");
// Initialize web server
if (Boolean.valueOf(properties.getProperty("http.enable"))) {
@@ -941,6 +941,21 @@ public class ServerManager {
}
}
+ private void initSanavServer(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 SanavProtocolDecoder(ServerManager.this));
+ }
+ });
+ }
+ }
+
private void initGatorServer(String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@@ -1003,19 +1018,4 @@ public class ServerManager {
}
}
- private void initSanavServer(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 SanavProtocolDecoder(ServerManager.this));
- }
- });
- }
- }
-
}