diff options
author | Abyss777 <abyss@fox5.ru> | 2016-10-21 07:19:40 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-10-21 07:19:40 +0500 |
commit | b2c02091c1d1a6d1e1270886d4fb5a33a5f3ed04 (patch) | |
tree | 46ba46a8f714ec3a70f8e44158f5eed01e4fd7ce /src/org/traccar/BasePipelineFactory.java | |
parent | eb15c16571c0070ae60f39dce6ae974128ff1be1 (diff) | |
download | trackermap-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.java | 9 |
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()); } |