aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-15 19:08:58 -0700
commitca884b765f3f7a642c435be886dbec40f9d1f661 (patch)
treeeb809ffe38faaf6e580fc2434beb9c4e0b3f90e5 /src/main/java/org/traccar/MainEventHandler.java
parent63ecf80c11ec9bce19df18fc24ad863a9c2cb212 (diff)
downloadtrackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.gz
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.tar.bz2
trackermap-server-ca884b765f3f7a642c435be886dbec40f9d1f661.zip
Convert some config usages
Diffstat (limited to 'src/main/java/org/traccar/MainEventHandler.java')
-rw-r--r--src/main/java/org/traccar/MainEventHandler.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/MainEventHandler.java b/src/main/java/org/traccar/MainEventHandler.java
index d4a0fae6c..7fff2e13f 100644
--- a/src/main/java/org/traccar/MainEventHandler.java
+++ b/src/main/java/org/traccar/MainEventHandler.java
@@ -23,6 +23,7 @@ import io.netty.handler.codec.http.HttpRequestDecoder;
import io.netty.handler.timeout.IdleStateEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.StatisticsManager;
import org.traccar.helper.DateUtil;
@@ -48,14 +49,13 @@ public class MainEventHandler extends ChannelInboundHandlerAdapter {
private final ConnectionManager connectionManager;
@Inject
- public MainEventHandler(ConnectionManager connectionManager) {
+ public MainEventHandler(Config config, ConnectionManager connectionManager) {
this.connectionManager = connectionManager;
- String connectionlessProtocolList = Context.getConfig().getString(Keys.STATUS_IGNORE_OFFLINE);
+ String connectionlessProtocolList = config.getString(Keys.STATUS_IGNORE_OFFLINE);
if (connectionlessProtocolList != null) {
connectionlessProtocols.addAll(Arrays.asList(connectionlessProtocolList.split("[, ]")));
}
- logAttributes.addAll(Arrays.asList(
- Context.getConfig().getString(Keys.LOGGER_ATTRIBUTES).split("[, ]")));
+ logAttributes.addAll(Arrays.asList(config.getString(Keys.LOGGER_ATTRIBUTES).split("[, ]")));
}
@Override