aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-23 16:17:25 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-23 16:17:25 +0500
commitbd2e0fdc6fe222316e9e740aa265b6d132d407b6 (patch)
tree0e146fde0b2a7556c380a4b715cb88e42b97d8cb /src/org/traccar/BasePipelineFactory.java
parenta445733519b4b38b52b03fbb63a55c7270cb9221 (diff)
downloadtrackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.tar.gz
trackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.tar.bz2
trackermap-server-bd2e0fdc6fe222316e9e740aa265b6d132d407b6.zip
Added possibility to disable event and geofence subsystems
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index b61d95171..9de9b3a52 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -132,20 +132,22 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
hemisphereHandler = new HemisphereHandler();
}
- commandResultEventHandler = new CommandResultEventHandler();
+ if (Context.getConfig().getBoolean("event.enable")) {
+ commandResultEventHandler = new CommandResultEventHandler();
- if (Context.getConfig().getBoolean("event.overspeedHandler")) {
- overspeedEventHandler = new OverspeedEventHandler();
- }
+ if (Context.getConfig().getBoolean("event.overspeedHandler")) {
+ overspeedEventHandler = new OverspeedEventHandler();
+ }
- if (Context.getConfig().getBoolean("event.motionHandler")) {
- motionEventHandler = new MotionEventHandler();
- }
+ if (Context.getConfig().getBoolean("event.motionHandler")) {
+ motionEventHandler = new MotionEventHandler();
+ }
- if (Context.getConfig().getBoolean("event.geofenceHandler")) {
- geofenceEventHandler = new GeofenceEventHandler();
+ if (Context.getConfig().getBoolean("geofence.enable")
+ && Context.getConfig().getBoolean("event.geofenceHandler")) {
+ geofenceEventHandler = new GeofenceEventHandler();
+ }
}
-
}
protected abstract void addSpecificHandlers(ChannelPipeline pipeline);