aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 33f778885..620c4729a 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -30,6 +30,7 @@ import org.jboss.netty.channel.SimpleChannelHandler;
import org.jboss.netty.handler.logging.LoggingHandler;
import org.jboss.netty.handler.timeout.IdleStateHandler;
import org.traccar.events.CommandResultEventHandler;
+import org.traccar.events.FuelDropEventHandler;
import org.traccar.events.GeofenceEventHandler;
import org.traccar.events.IgnitionEventHandler;
import org.traccar.events.MaintenanceEventHandler;
@@ -55,6 +56,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
private CommandResultEventHandler commandResultEventHandler;
private OverspeedEventHandler overspeedEventHandler;
+ private FuelDropEventHandler fuelDropEventHandler;
private MotionEventHandler motionEventHandler;
private GeofenceEventHandler geofenceEventHandler;
private AlertEventHandler alertEventHandler;
@@ -153,25 +155,12 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
if (Context.getConfig().getBoolean("event.enable")) {
commandResultEventHandler = new CommandResultEventHandler();
-
- if (Context.getConfig().getBoolean("event.overspeedHandler")) {
- overspeedEventHandler = new OverspeedEventHandler();
- }
-
- if (Context.getConfig().getBoolean("event.motionHandler")) {
- motionEventHandler = new MotionEventHandler();
- }
- }
- if (Context.getConfig().getBoolean("event.geofenceHandler")) {
+ overspeedEventHandler = new OverspeedEventHandler();
+ fuelDropEventHandler = new FuelDropEventHandler();
+ motionEventHandler = new MotionEventHandler();
geofenceEventHandler = new GeofenceEventHandler();
- }
- if (Context.getConfig().getBoolean("event.alertHandler")) {
alertEventHandler = new AlertEventHandler();
- }
- if (Context.getConfig().getBoolean("event.ignitionHandler")) {
ignitionEventHandler = new IgnitionEventHandler();
- }
- if (Context.getConfig().getBoolean("event.maintenanceHandler")) {
maintenanceEventHandler = new MaintenanceEventHandler();
}
}
@@ -236,6 +225,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory {
pipeline.addLast("OverspeedEventHandler", overspeedEventHandler);
}
+ if (fuelDropEventHandler != null) {
+ pipeline.addLast("FuelDropEventHandler", fuelDropEventHandler);
+ }
+
if (motionEventHandler != null) {
pipeline.addLast("MotionEventHandler", motionEventHandler);
}