aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 15:40:41 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-23 15:40:41 -0800
commita129cfd3159c02b4f3996dbdfb5299ac95a6720c (patch)
tree1d85533a859e444eff32d92730d0805f6aac08c5 /src/org/traccar/BasePipelineFactory.java
parentb7d48127e60bcaa5d01f45d8df5203f28f9a1667 (diff)
downloadtrackermap-server-a129cfd3159c02b4f3996dbdfb5299ac95a6720c.tar.gz
trackermap-server-a129cfd3159c02b4f3996dbdfb5299ac95a6720c.tar.bz2
trackermap-server-a129cfd3159c02b4f3996dbdfb5299ac95a6720c.zip
Refactor remote address handler
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index d32e1fc6c..d5a90390e 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -40,6 +40,7 @@ import org.traccar.handler.DistanceHandler;
import org.traccar.handler.FilterHandler;
import org.traccar.handler.NetworkMessageHandler;
import org.traccar.handler.OpenChannelHandler;
+import org.traccar.handler.RemoteAddressHandler;
import org.traccar.handler.StandardLoggingHandler;
import java.util.Map;
@@ -52,7 +53,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private int timeout;
private EngineHoursHandler engineHoursHandler;
- private RemoteAddressHandler remoteAddressHandler;
private MotionHandler motionHandler;
private GeocoderHandler geocoderHandler;
private GeolocationHandler geolocationHandler;
@@ -78,10 +78,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
timeout = Context.getConfig().getInteger(Keys.SERVER_TIMEOUT);
}
- if (Context.getConfig().getBoolean("handler.remoteAddress.enable")) {
- remoteAddressHandler = new RemoteAddressHandler();
- }
-
if (Context.getGeocoder() != null && !Context.getConfig().getBoolean("geocoder.ignorePositions")) {
geocoderHandler = new GeocoderHandler(
Context.getGeocoder(),
@@ -105,7 +101,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
hemisphereHandler = new HemisphereHandler();
}
- if (Context.getConfig().getBoolean("handler.copyAttributes.enable")) {
+ if (Context.getConfig().getBoolean("processing.copyAttributes.enable")) {
copyAttributesHandler = new CopyAttributesHandler();
}
@@ -178,7 +174,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
geolocationHandler,
hemisphereHandler,
Main.getInjector().getInstance(DistanceHandler.class),
- remoteAddressHandler);
+ Main.getInjector().getInstance(RemoteAddressHandler.class));
addDynamicHandlers(pipeline);