diff options
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/org/traccar/BasePipelineFactory.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 31845290f..2b5028f33 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -44,6 +44,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { private int timeout; private FilterHandler filterHandler; + private CoordinatesHandler coordinatesHandler; private DistanceHandler distanceHandler; private ReverseGeocoderHandler reverseGeocoderHandler; private LocationProviderHandler locationProviderHandler; @@ -115,6 +116,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { filterHandler = new FilterHandler(); } + if (Context.getConfig().getBoolean("coordinates.filter")) { + coordinatesHandler = new CoordinatesHandler(); + } + if (Context.getReverseGeocoder() != null) { reverseGeocoderHandler = new ReverseGeocoderHandler( Context.getReverseGeocoder(), Context.getConfig().getBoolean("geocoder.processInvalidPositions")); @@ -188,6 +193,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { pipeline.addLast("filter", filterHandler); } + if (coordinatesHandler != null) { + pipeline.addLast("coordinatesHandler", coordinatesHandler); + } + if (Context.getDataManager() != null) { pipeline.addLast("dataHandler", new DefaultDataHandler()); } |