diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-24 10:45:26 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-02-24 10:45:26 -0800 |
commit | 98993ee219b6c0cb31f2f3b1608d378b2e028535 (patch) | |
tree | 77a6e8366c27b8b3851e52b6ab81ff62920b970c /src/org/traccar/BasePipelineFactory.java | |
parent | a129cfd3159c02b4f3996dbdfb5299ac95a6720c (diff) | |
download | traccar-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.tar.gz traccar-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.tar.bz2 traccar-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.zip |
Refactor geolocation
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/org/traccar/BasePipelineFactory.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index d5a90390e..b993e0741 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -38,6 +38,7 @@ import org.traccar.handler.ComputedAttributesHandler; import org.traccar.handler.CopyAttributesHandler; import org.traccar.handler.DistanceHandler; import org.traccar.handler.FilterHandler; +import org.traccar.handler.GeolocationHandler; import org.traccar.handler.NetworkMessageHandler; import org.traccar.handler.OpenChannelHandler; import org.traccar.handler.RemoteAddressHandler; @@ -55,7 +56,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> { private EngineHoursHandler engineHoursHandler; private MotionHandler motionHandler; private GeocoderHandler geocoderHandler; - private GeolocationHandler geolocationHandler; private HemisphereHandler hemisphereHandler; private CopyAttributesHandler copyAttributesHandler; private ComputedAttributesHandler computedAttributesHandler; @@ -84,12 +84,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> { Context.getConfig().getBoolean("geocoder.processInvalidPositions")); } - if (Context.getGeolocationProvider() != null) { - geolocationHandler = new GeolocationHandler( - Context.getGeolocationProvider(), - Context.getConfig().getBoolean("geolocation.processInvalidPositions")); - } - motionHandler = new MotionHandler(Context.getTripsConfig().getSpeedThreshold()); if (Context.getConfig().getBoolean("processing.engineHours.enable")) { @@ -171,7 +165,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> { addHandlers( pipeline, - geolocationHandler, + Main.getInjector().getInstance(GeolocationHandler.class), hemisphereHandler, Main.getInjector().getInstance(DistanceHandler.class), Main.getInjector().getInstance(RemoteAddressHandler.class)); |