aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 5a077da7c..b0de67a15 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -51,6 +51,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private FilterHandler filterHandler;
private DistanceHandler distanceHandler;
+ private EngineHoursHandler engineHoursHandler;
private RemoteAddressHandler remoteAddressHandler;
private MotionHandler motionHandler;
private GeocoderHandler geocoderHandler;
@@ -155,6 +156,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
motionHandler = new MotionHandler(Context.getTripsConfig().getSpeedThreshold());
+ if (Context.getConfig().getBoolean("processing.engineHours.enable")) {
+ engineHoursHandler = new EngineHoursHandler();
+ }
+
if (Context.getConfig().hasKey("location.latitudeHemisphere")
|| Context.getConfig().hasKey("location.longitudeHemisphere")) {
hemisphereHandler = new HemisphereHandler();
@@ -225,6 +230,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("motion", motionHandler);
}
+ if (engineHoursHandler != null) {
+ pipeline.addLast("engineHours", engineHoursHandler);
+ }
+
if (copyAttributesHandler != null) {
pipeline.addLast("copyAttributes", copyAttributesHandler);
}