aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-05-09 14:47:28 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-05-09 14:47:28 +1200
commit4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82 (patch)
treee145e20169c61e12bb57f9145bc0c626add5596d /src/org/traccar/ServerManager.java
parent7ed27b733d442cb442a8049263fab282b39e5872 (diff)
parent301f2d314f446410da78615ac76ce0c07571d445 (diff)
downloadtrackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.tar.gz
trackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.tar.bz2
trackermap-server-4e44bf1fa20bf6ce41cc7e0eed9b79d079454f82.zip
Merge pull request #1920 from gaborgsomogyi/command_framework
Get supported commands from server
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index cd6a071db..010438a44 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -62,20 +62,21 @@ public class ServerManager {
for (String name : names) {
Class protocolClass = Class.forName(packageName + '.' + name);
if (BaseProtocol.class.isAssignableFrom(protocolClass)) {
- initProtocolServer((BaseProtocol) protocolClass.newInstance());
+ BaseProtocol baseProtocol = (BaseProtocol) protocolClass.newInstance();
+ initProtocolServer(baseProtocol);
}
}
}
public void start() {
- for (Object server: serverList) {
- ((TrackerServer) server).start();
+ for (TrackerServer server: serverList) {
+ server.start();
}
}
public void stop() {
- for (Object server: serverList) {
- ((TrackerServer) server).stop();
+ for (TrackerServer server: serverList) {
+ server.stop();
}
// Release resources