aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-10-21 07:19:40 +0500
committerAbyss777 <abyss@fox5.ru>2016-10-21 07:19:40 +0500
commitb2c02091c1d1a6d1e1270886d4fb5a33a5f3ed04 (patch)
tree46ba46a8f714ec3a70f8e44158f5eed01e4fd7ce /src/org/traccar/BasePipelineFactory.java
parenteb15c16571c0070ae60f39dce6ae974128ff1be1 (diff)
downloadtrackermap-server-b2c02091c1d1a6d1e1270886d4fb5a33a5f3ed04.tar.gz
trackermap-server-b2c02091c1d1a6d1e1270886d4fb5a33a5f3ed04.tar.bz2
trackermap-server-b2c02091c1d1a6d1e1270886d4fb5a33a5f3ed04.zip
Implement copy attributes from last position
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 837712e84..6d7089644 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -50,6 +50,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private ReverseGeocoderHandler reverseGeocoderHandler;
private LocationProviderHandler locationProviderHandler;
private HemisphereHandler hemisphereHandler;
+ private CopyAttributesHandler copyAttributesHandler;
private CommandResultEventHandler commandResultEventHandler;
private OverspeedEventHandler overspeedEventHandler;
@@ -139,6 +140,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
hemisphereHandler = new HemisphereHandler();
}
+ if (Context.getConfig().getBoolean("processing.copyAttributes.enable")) {
+ copyAttributesHandler = new CopyAttributesHandler();
+ }
+
if (Context.getConfig().getBoolean("event.enable")) {
commandResultEventHandler = new CommandResultEventHandler();
@@ -201,6 +206,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("distance", distanceHandler);
}
+ if (copyAttributesHandler != null) {
+ pipeline.addLast("copyAttributes", copyAttributesHandler);
+ }
+
if (Context.getDataManager() != null) {
pipeline.addLast("dataHandler", new DefaultDataHandler());
}