aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authoramilasilva88 <amilasilva88@gmail.com>2015-08-13 20:28:58 +0800
committeramilasilva88 <amilasilva88@gmail.com>2015-08-13 20:28:58 +0800
commit0350d762a7c08199e79dc401b6c6821d7e2a21bd (patch)
tree5b0751fb43278026aee2c153ae131e17776beecd /src/org/traccar/BasePipelineFactory.java
parenta5b29b0e5df4ba84c8eaa8944258b9c9e12472db (diff)
downloadtrackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.tar.gz
trackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.tar.bz2
trackermap-server-0350d762a7c08199e79dc401b6c6821d7e2a21bd.zip
Added ODOMeter and Modification to Mobile UI
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 4d8b0ffc4..410b57318 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -38,6 +38,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private int resetDelay;
private FilterHandler filterHandler;
+ private ODOMeterHandler odoMeterHandler;
private ReverseGeocoderHandler reverseGeocoderHandler;
protected class OpenChannelHandler extends SimpleChannelHandler {
@@ -92,6 +93,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
filterHandler = new FilterHandler();
}
+ if (Context.getConfig().getBoolean("system.odometer.enable")) {
+ odoMeterHandler = new ODOMeterHandler();
+ }
+
if (Context.getReverseGeocoder() != null) {
reverseGeocoderHandler = new ReverseGeocoderHandler(
Context.getReverseGeocoder(), Context.getConfig().getBoolean("geocode.processInvalidPositions"));
@@ -114,6 +119,11 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
if (filterHandler != null) {
pipeline.addLast("filter", filterHandler);
}
+
+ if (odoMeterHandler != null) {
+ pipeline.addLast("odoMeter", odoMeterHandler);
+ }
+
if (reverseGeocoderHandler != null) {
pipeline.addLast("geocoder", reverseGeocoderHandler);
}