aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/TrackerServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-23 15:49:56 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-23 15:49:56 +1200
commit2a3fad9496decd83f06ae5abf067f8d4337ec741 (patch)
tree69837f0bf89cf6ff78915d70380118575cc5c47a /src/org/traccar/TrackerServer.java
parenta8d2a0170b7ac891ffe784320ac2d1389f11bf68 (diff)
downloadtrackermap-server-2a3fad9496decd83f06ae5abf067f8d4337ec741.tar.gz
trackermap-server-2a3fad9496decd83f06ae5abf067f8d4337ec741.tar.bz2
trackermap-server-2a3fad9496decd83f06ae5abf067f8d4337ec741.zip
Major code refacroting
Diffstat (limited to 'src/org/traccar/TrackerServer.java')
-rw-r--r--src/org/traccar/TrackerServer.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java
index 7ae1c8498..c65583584 100644
--- a/src/org/traccar/TrackerServer.java
+++ b/src/org/traccar/TrackerServer.java
@@ -33,7 +33,6 @@ import org.jboss.netty.channel.group.DefaultChannelGroup;
*/
public abstract class TrackerServer {
- private final ServerManager serverManager;
private final Bootstrap bootstrap;
private final String protocol;
@@ -41,8 +40,7 @@ public abstract class TrackerServer {
return protocol;
}
- public TrackerServer(ServerManager serverManager, Bootstrap bootstrap, String protocol) {
- this.serverManager = serverManager;
+ public TrackerServer(Bootstrap bootstrap, String protocol) {
this.bootstrap = bootstrap;
this.protocol = protocol;
@@ -53,11 +51,11 @@ public abstract class TrackerServer {
bootstrap.setFactory(GlobalChannelFactory.getDatagramFactory());
}
- address = serverManager.getProperties().getProperty(protocol + ".address");
- String portProperty = serverManager.getProperties().getProperty(protocol + ".port");
+ address = Context.getProps().getProperty(protocol + ".address");
+ String portProperty = Context.getProps().getProperty(protocol + ".port");
port = Integer.valueOf(portProperty);
- bootstrap.setPipelineFactory(new BasePipelineFactory(serverManager, this, protocol) {
+ bootstrap.setPipelineFactory(new BasePipelineFactory(this, protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
TrackerServer.this.addSpecificHandlers(pipeline);