aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-15 23:31:37 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-15 23:31:37 +1300
commitb9e28d25c859ddab488b9e13fc6c019d26318ed6 (patch)
treed10f456c153d2861b891b9f304f21f4614a7574a /src/org/traccar/ServerManager.java
parentd8552cb2975ec8a78ed07e0ec0f1ba1c7d34086a (diff)
downloadtrackermap-server-b9e28d25c859ddab488b9e13fc6c019d26318ed6.tar.gz
trackermap-server-b9e28d25c859ddab488b9e13fc6c019d26318ed6.tar.bz2
trackermap-server-b9e28d25c859ddab488b9e13fc6c019d26318ed6.zip
Remove protocol detector classes
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 08557a5d6..2fa44831f 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -68,8 +68,6 @@ public class ServerManager {
initProtocolServer((BaseProtocol) protocolClass.newInstance());
}
}
-
- initProtocolDetector();
}
public void start() {
@@ -88,30 +86,8 @@ public class ServerManager {
GlobalTimer.release();
}
- private boolean isProtocolEnabled(String protocol) {
- return Context.getConfig().hasKey(protocol + ".port");
- }
-
- private void initProtocolDetector() {
- String protocol = "detector";
- if (isProtocolEnabled(protocol)) {
- serverList.add(new TrackerServer(new ServerBootstrap(), protocol) {
- @Override
- protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("detectorHandler", new DetectorHandler(serverList));
- }
- });
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), protocol) {
- @Override
- protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("detectorHandler", new DetectorHandler(serverList));
- }
- });
- }
- }
-
private void initProtocolServer(final Protocol protocol) {
- if (isProtocolEnabled(protocol.getName())) {
+ if (Context.getConfig().hasKey(protocol.getName() + ".port")) {
protocol.initTrackerServers(serverList);
}
}