aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-05-31 09:04:38 +0500
committerAbyss777 <abyss@fox5.ru>2018-05-31 09:04:38 +0500
commit3d14b6504b01b26e529717b88318be54094b8816 (patch)
tree2586ec5b6e0d0e28615a6caf7b7f69ce94f7573b /src/org/traccar/BasePipelineFactory.java
parent607123610018cdc1f0e391fec43e54e769d40a06 (diff)
downloadtrackermap-server-3d14b6504b01b26e529717b88318be54094b8816.tar.gz
trackermap-server-3d14b6504b01b26e529717b88318be54094b8816.tar.bz2
trackermap-server-3d14b6504b01b26e529717b88318be54094b8816.zip
Add engine hours handler
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..e325a6033 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("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);
}