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.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 11457905d..45213c1a1 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 CoordinatesHandler coordinatesHandler;
private DistanceHandler distanceHandler;
+ private MotionHandler motionHandler;
private GeocoderHandler geocoderHandler;
private GeolocationHandler geolocationHandler;
private HemisphereHandler hemisphereHandler;
@@ -147,6 +148,8 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
distanceHandler = new DistanceHandler();
+ motionHandler = new MotionHandler(Context.getConfig().getDouble("event.motion.speedThreshold", 0.01));
+
if (Context.getConfig().hasKey("location.latitudeHemisphere")
|| Context.getConfig().hasKey("location.longitudeHemisphere")) {
hemisphereHandler = new HemisphereHandler();
@@ -212,6 +215,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("distance", distanceHandler);
}
+ if (motionHandler != null) {
+ pipeline.addLast("motion", motionHandler);
+ }
+
if (copyAttributesHandler != null) {
pipeline.addLast("copyAttributes", copyAttributesHandler);
}