aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2014-10-10 19:23:21 -0400
committerjon-stumpf <jon.stumpf@gmail.com>2014-10-21 16:01:41 -0400
commit1948e0f63202dddca607dcb51fa9a92a83e49154 (patch)
tree3771c3d64b219704cbbb2cb8f69ac941dbb34da0 /src/org/traccar/ServerManager.java
parent8876e964cf26a090d11fd855642c95bc02a17c7f (diff)
downloadtrackermap-server-1948e0f63202dddca607dcb51fa9a92a83e49154.tar.gz
trackermap-server-1948e0f63202dddca607dcb51fa9a92a83e49154.tar.bz2
trackermap-server-1948e0f63202dddca607dcb51fa9a92a83e49154.zip
Eliminated the need for hardcoded protocol strings in the src/org/traccar/protocol/*ProtocolDecoder.java files.
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java292
1 files changed, 146 insertions, 146 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 33d364cc4..9edb1cf5e 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -228,20 +228,20 @@ public class ServerManager {
return false;
}
- private void initXexunServer(String protocol) throws SQLException {
+ private void initXexunServer(final 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 XexunFrameDecoder());
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new XexunProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new XexunProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGps103Server(String protocol) throws SQLException {
+ private void initGps103Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -255,7 +255,7 @@ public class ServerManager {
ChannelBuffers.wrappedBuffer(delimiter3)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(ServerManager.this, protocol));
}
});
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@@ -263,13 +263,13 @@ public class ServerManager {
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gps103ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTk103Server(String protocol) throws SQLException {
+ private void initTk103Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -279,7 +279,7 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this, protocol));
}
});
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@@ -287,13 +287,13 @@ public class ServerManager {
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Tk103ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGl100Server(String protocol) throws SQLException {
+ private void initGl100Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -303,13 +303,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Gl100ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gl100ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGl200Server(String protocol) throws SQLException {
+ private void initGl200Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -322,13 +322,13 @@ public class ServerManager {
ChannelBuffers.wrappedBuffer(delimiter2)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initT55Server(String protocol) throws SQLException {
+ private void initT55Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -338,13 +338,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new T55ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new T55ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initXexun2Server(String protocol) throws SQLException {
+ private void initXexun2Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -353,50 +353,50 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new Xexun2ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Xexun2ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTotemServer(String protocol) throws SQLException {
+ private void initTotemServer(final 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));
+ pipeline.addLast("objectDecoder", new TotemProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initEnforaServer(String protocol) throws SQLException {
+ private void initEnforaServer(final 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 LengthFieldBasedFrameDecoder(1024, 0, 2, -2, 2));
- pipeline.addLast("objectDecoder", new EnforaProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new EnforaProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initMeiligaoServer(String protocol) throws SQLException {
+ private void initMeiligaoServer(final 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 MeiligaoFrameDecoder());
- pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initMaxonServer(String protocol) throws SQLException {
+ private void initMaxonServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -406,13 +406,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new MaxonProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new MaxonProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initSuntechServer(String protocol) throws SQLException {
+ private void initSuntechServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -421,19 +421,19 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new SuntechProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new SuntechProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initProgressServer(String protocol) throws SQLException {
+ private void initProgressServer(final 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, 2, 2, 4, 0));
- pipeline.addLast("objectDecoder", new ProgressProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new ProgressProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -441,31 +441,31 @@ public class ServerManager {
}
}
- private void initH02Server(String protocol) throws SQLException {
+ private void initH02Server(final 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 H02FrameDecoder());
- pipeline.addLast("objectDecoder", new H02ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new H02ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initJt600Server(String protocol) throws SQLException {
+ private void initJt600Server(final 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 Jt600FrameDecoder());
- pipeline.addLast("objectDecoder", new Jt600ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Jt600ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initEv603Server(String protocol) throws SQLException {
+ private void initEv603Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -474,13 +474,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new Ev603ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Ev603ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initV680Server(String protocol) throws SQLException {
+ private void initV680Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -489,20 +489,20 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new V680ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new V680ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initPt502Server(String protocol) throws SQLException {
+ private void initPt502Server(final 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 Pt502FrameDecoder());
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new Pt502ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Pt502ProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -510,7 +510,7 @@ public class ServerManager {
}
}
- private void initTr20Server(String protocol) throws SQLException {
+ private void initTr20Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -520,19 +520,19 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Tr20ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Tr20ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initNavisServer(String protocol) throws SQLException {
+ private void initNavisServer(final 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(4 * 1024, 12, 2, 2, 0));
- pipeline.addLast("objectDecoder", new NavisProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new NavisProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -540,14 +540,14 @@ public class ServerManager {
}
}
- private void initMeitrackServer(String protocol) throws SQLException {
+ private void initMeitrackServer(final 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 MeitrackFrameDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -555,42 +555,42 @@ public class ServerManager {
}
}
- private void initSkypatrolServer(String protocol) throws SQLException {
+ private void initSkypatrolServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("objectDecoder", new SkypatrolProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new SkypatrolProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGt02Server(String protocol) throws SQLException {
+ private void initGt02Server(final 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 LengthFieldBasedFrameDecoder(256, 2, 1, 2, 0));
- pipeline.addLast("objectDecoder", new Gt02ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gt02ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGt06Server(String protocol) throws SQLException {
+ private void initGt06Server(final 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 Gt06FrameDecoder());
- pipeline.addLast("objectDecoder", new Gt06ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Gt06ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initMegastekServer(String protocol) throws SQLException {
+ private void initMegastekServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -598,19 +598,19 @@ public class ServerManager {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new MegastekProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new MegastekProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initNavigilServer(String protocol) throws SQLException {
+ private void initNavigilServer(final 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 NavigilFrameDecoder());
- pipeline.addLast("objectDecoder", new NavigilProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new NavigilProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -618,7 +618,7 @@ public class ServerManager {
}
}
- private void initGpsGateServer(String protocol) throws SQLException {
+ private void initGpsGateServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -628,51 +628,51 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new GpsGateProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new GpsGateProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTeltonikaServer(String protocol) throws SQLException {
+ private void initTeltonikaServer(final 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 TeltonikaFrameDecoder());
- pipeline.addLast("objectDecoder", new TeltonikaProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new TeltonikaProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initMta6Server(String protocol) throws SQLException {
+ private void initMta6Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpDecoder", new HttpRequestDecoder());
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
- pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(ServerManager.this, false));
+ pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(ServerManager.this, protocol, false));
}
});
}
}
- private void initMta6CanServer(String protocol) throws SQLException {
+ private void initMta6CanServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpDecoder", new HttpRequestDecoder());
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
- pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(ServerManager.this, true));
+ pipeline.addLast("objectDecoder", new Mta6ProtocolDecoder(ServerManager.this, protocol, true));
}
});
}
}
- private void initTlt2hServer(String protocol) throws SQLException {
+ private void initTlt2hServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -682,13 +682,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(32 * 1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Tlt2hProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Tlt2hProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initSyrusServer(String protocol) throws SQLException {
+ private void initSyrusServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -698,32 +698,32 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new SyrusProtocolDecoder(ServerManager.this, true));
+ pipeline.addLast("objectDecoder", new SyrusProtocolDecoder(ServerManager.this, protocol, true));
}
});
}
}
- private void initWondexServer(String protocol) throws SQLException {
+ private void initWondexServer(final 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 WondexFrameDecoder());
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new WondexProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new WondexProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initCellocatorServer(String protocol) throws SQLException {
+ private void initCellocatorServer(final 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 CellocatorFrameDecoder());
- pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new CellocatorProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -731,13 +731,13 @@ public class ServerManager {
}
}
- private void initGalileoServer(String protocol) throws SQLException {
+ private void initGalileoServer(final 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 GalileoFrameDecoder());
- pipeline.addLast("objectDecoder", new GalileoProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new GalileoProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -745,7 +745,7 @@ public class ServerManager {
}
}
- private void initYwtServer(String protocol) throws SQLException {
+ private void initYwtServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -755,13 +755,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new YwtProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new YwtProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTk102Server(String protocol) throws SQLException {
+ private void initTk102Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -771,13 +771,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Tk102ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Tk102ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initIntellitracServer(String protocol) throws SQLException {
+ private void initIntellitracServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -785,25 +785,25 @@ public class ServerManager {
pipeline.addLast("frameDecoder", new IntellitracFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new IntellitracProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new IntellitracProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initXt7Server(String protocol) throws SQLException {
+ private void initXt7Server(final 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 LengthFieldBasedFrameDecoder(256, 20, 1, 5, 0));
- pipeline.addLast("objectDecoder", new Xt7ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Xt7ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initWialonServer(String protocol) throws SQLException {
+ private void initWialonServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -811,13 +811,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new WialonProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new WialonProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initCarscopServer(String protocol) throws SQLException {
+ private void initCarscopServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -827,19 +827,19 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new CarscopProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new CarscopProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initApelServer(String protocol) throws SQLException {
+ private void initApelServer(final 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, 2, 2, 4, 0));
- pipeline.addLast("objectDecoder", new ApelProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new ApelProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -847,7 +847,7 @@ public class ServerManager {
}
}
- private void initManPowerServer(String protocol) throws SQLException {
+ private void initManPowerServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -857,13 +857,13 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new ManPowerProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new ManPowerProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGlobalSatServer(String protocol) throws SQLException {
+ private void initGlobalSatServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -873,25 +873,25 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new GlobalSatProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new GlobalSatProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initAtrackServer(String protocol) throws SQLException {
+ private void initAtrackServer(final 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 AtrackFrameDecoder());
- pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new AtrackProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initPt3000Server(String protocol) throws SQLException {
+ private void initPt3000Server(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -901,25 +901,25 @@ public class ServerManager {
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new Pt3000ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Pt3000ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initRuptelaServer(String protocol) throws SQLException {
+ private void initRuptelaServer(final 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 LengthFieldBasedFrameDecoder(1024, 0, 2, 2, 0));
- pipeline.addLast("objectDecoder", new RuptelaProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new RuptelaProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTopflytechServer(String protocol) throws SQLException {
+ private void initTopflytechServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -928,13 +928,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new TopflytechProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new TopflytechProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initLaipacServer(String protocol) throws SQLException {
+ private void initLaipacServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -942,25 +942,25 @@ public class ServerManager {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new LaipacProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new LaipacProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initAplicomServer(String protocol) throws SQLException {
+ private void initAplicomServer(final 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));
+ pipeline.addLast("objectDecoder", new AplicomProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGotopServer(String protocol) throws SQLException {
+ private void initGotopServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -969,13 +969,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new GotopProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new GotopProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initSanavServer(String protocol) throws SQLException {
+ private void initSanavServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -984,29 +984,29 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new SanavProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new SanavProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initGatorServer(String protocol) throws SQLException {
+ private void initGatorServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("objectDecoder", new GatorProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new GatorProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initNoranServer(String protocol) throws SQLException {
+ private void initNoranServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
TrackerServer server = new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("objectDecoder", new NoranProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new NoranProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -1014,32 +1014,32 @@ public class ServerManager {
}
}
- private void initM2mServer(String protocol) throws SQLException {
+ private void initM2mServer(final 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 FixedLengthFrameDecoder(23));
- pipeline.addLast("objectDecoder", new M2mProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new M2mProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initOsmAndServer(String protocol) throws SQLException {
+ private void initOsmAndServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("httpDecoder", new HttpRequestDecoder());
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
- pipeline.addLast("objectDecoder", new OsmAndProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new OsmAndProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initEasyTrackServer(String protocol) throws SQLException {
+ private void initEasyTrackServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1048,37 +1048,37 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new EasyTrackProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new EasyTrackProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTaipServer(String protocol) throws SQLException {
+ private void initTaipServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ConnectionlessBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new SyrusProtocolDecoder(ServerManager.this, false));
+ pipeline.addLast("objectDecoder", new SyrusProtocolDecoder(ServerManager.this, protocol, false));
}
});
}
}
- private void initKhdServer(String protocol) throws SQLException {
+ private void initKhdServer(final 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 LengthFieldBasedFrameDecoder(256, 3, 2));
- pipeline.addLast("objectDecoder", new KhdProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new KhdProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initPiligrimServer(String protocol) throws SQLException {
+ private void initPiligrimServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1086,26 +1086,26 @@ public class ServerManager {
pipeline.addLast("httpDecoder", new HttpRequestDecoder());
pipeline.addLast("httpAggregator", new HttpChunkAggregator(16384));
pipeline.addLast("httpEncoder", new HttpResponseEncoder());
- pipeline.addLast("objectDecoder", new PiligrimProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new PiligrimProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initStl060Server(String protocol) throws SQLException {
+ private void initStl060Server(final 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 Stl060FrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new Stl060ProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new Stl060ProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initCarTrackServer(String protocol) throws SQLException {
+ private void initCarTrackServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1114,13 +1114,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new CarTrackProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new CarTrackProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initMiniFinderServer(String protocol) throws SQLException {
+ private void initMiniFinderServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1129,13 +1129,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new MiniFinderProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new MiniFinderProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initHaicomServer(String protocol) throws SQLException {
+ private void initHaicomServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1144,25 +1144,25 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new HaicomProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new HaicomProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initEelinkServer(String protocol) throws SQLException {
+ private void initEelinkServer(final 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 LengthFieldBasedFrameDecoder(1024, 3, 2));
- pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initBoxServer(String protocol) throws SQLException {
+ private void initBoxServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1171,26 +1171,26 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new BoxProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new BoxProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initFreedomServer(String protocol) throws SQLException {
+ private void initFreedomServer(final 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("objectDecoder", new FreedomProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new FreedomProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTelikServer(String protocol) throws SQLException {
+ private void initTelikServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1199,13 +1199,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new TelikProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new TelikProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initTrackboxServer(String protocol) throws SQLException {
+ private void initTrackboxServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1213,13 +1213,13 @@ public class ServerManager {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
- pipeline.addLast("objectDecoder", new TrackboxProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new TrackboxProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initVisiontekServer(String protocol) throws SQLException {
+ private void initVisiontekServer(final String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
@@ -1228,19 +1228,19 @@ public class ServerManager {
pipeline.addLast("frameDecoder",
new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("objectDecoder", new VisiontekProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new VisiontekProtocolDecoder(ServerManager.this, protocol));
}
});
}
}
- private void initOrionServer(String protocol) throws SQLException {
+ private void initOrionServer(final 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 OrionFrameDecoder());
- pipeline.addLast("objectDecoder", new OrionProtocolDecoder(ServerManager.this));
+ pipeline.addLast("objectDecoder", new OrionProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);
@@ -1248,13 +1248,13 @@ public class ServerManager {
}
}
- private void initRitiServer(String protocol) throws SQLException {
+ private void initRitiServer(final 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));
+ pipeline.addLast("objectDecoder", new RitiProtocolDecoder(ServerManager.this, protocol));
}
};
server.setEndianness(ByteOrder.LITTLE_ENDIAN);