aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-25 22:00:30 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-25 22:00:30 -0800
commit2b9469e85bf7da0905ac3a679554178532f51009 (patch)
tree21ac831f314f2dcb302a7e5e25456523074c205b /src/org/traccar/BasePipelineFactory.java
parentb8318c0a9a09dd0811eee189237e80b7da478e5a (diff)
downloadtrackermap-server-2b9469e85bf7da0905ac3a679554178532f51009.tar.gz
trackermap-server-2b9469e85bf7da0905ac3a679554178532f51009.tar.bz2
trackermap-server-2b9469e85bf7da0905ac3a679554178532f51009.zip
Refactor engine hours handler
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index cb60b20a7..1b3be36fc 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -37,6 +37,7 @@ import org.traccar.events.OverspeedEventHandler;
import org.traccar.handler.ComputedAttributesHandler;
import org.traccar.handler.CopyAttributesHandler;
import org.traccar.handler.DistanceHandler;
+import org.traccar.handler.EngineHoursHandler;
import org.traccar.handler.FilterHandler;
import org.traccar.handler.GeocoderHandler;
import org.traccar.handler.GeolocationHandler;
@@ -56,7 +57,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private final TrackerServer server;
private int timeout;
- private EngineHoursHandler engineHoursHandler;
private CopyAttributesHandler copyAttributesHandler;
private ComputedAttributesHandler computedAttributesHandler;
@@ -78,10 +78,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
timeout = Context.getConfig().getInteger(Keys.SERVER_TIMEOUT);
}
- if (Context.getConfig().getBoolean("processing.engineHours.enable")) {
- engineHoursHandler = new EngineHoursHandler();
- }
-
if (Context.getConfig().getBoolean("processing.copyAttributes.enable")) {
copyAttributesHandler = new CopyAttributesHandler();
}
@@ -164,7 +160,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
Main.getInjector().getInstance(FilterHandler.class),
Main.getInjector().getInstance(GeocoderHandler.class),
Main.getInjector().getInstance(MotionHandler.class),
- engineHoursHandler,
+ Main.getInjector().getInstance(EngineHoursHandler.class),
copyAttributesHandler,
computedAttributesHandler);