aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-24 10:45:26 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-24 10:45:26 -0800
commit98993ee219b6c0cb31f2f3b1608d378b2e028535 (patch)
tree77a6e8366c27b8b3851e52b6ab81ff62920b970c /src/org/traccar/BasePipelineFactory.java
parenta129cfd3159c02b4f3996dbdfb5299ac95a6720c (diff)
downloadtrackermap-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.tar.gz
trackermap-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.tar.bz2
trackermap-server-98993ee219b6c0cb31f2f3b1608d378b2e028535.zip
Refactor geolocation
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java10
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));