diff options
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()); } |