aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/main/java/org/traccar/BasePipelineFactory.java32
1 files changed, 11 insertions, 21 deletions
diff --git a/src/main/java/org/traccar/BasePipelineFactory.java b/src/main/java/org/traccar/BasePipelineFactory.java
index ab781fd7a..642c75ea9 100644
--- a/src/main/java/org/traccar/BasePipelineFactory.java
+++ b/src/main/java/org/traccar/BasePipelineFactory.java
@@ -55,13 +55,11 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private final TrackerServer server;
private final String protocol;
- private final boolean eventsEnabled;
private int timeout;
public BasePipelineFactory(TrackerServer server, String protocol) {
this.server = server;
this.protocol = protocol;
- eventsEnabled = Context.getConfig().getBoolean(Keys.EVENT_ENABLE);
timeout = Context.getConfig().getInteger(Keys.PROTOCOL_TIMEOUT.withPrefix(protocol));
if (timeout == 0) {
timeout = Context.getConfig().getInteger(Keys.SERVER_TIMEOUT);
@@ -122,10 +120,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
GeolocationHandler.class,
HemisphereHandler.class,
DistanceHandler.class,
- RemoteAddressHandler.class);
-
- addHandlers(
- pipeline,
+ RemoteAddressHandler.class,
FilterHandler.class,
GeocoderHandler.class,
SpeedLimitHandler.class,
@@ -134,21 +129,16 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
EngineHoursHandler.class,
ComputedAttributesHandler.class,
WebDataHandler.class,
- DefaultDataHandler.class);
-
- if (eventsEnabled) {
- addHandlers(
- pipeline,
- CommandResultEventHandler.class,
- OverspeedEventHandler.class,
- FuelDropEventHandler.class,
- MotionEventHandler.class,
- GeofenceEventHandler.class,
- AlertEventHandler.class,
- IgnitionEventHandler.class,
- MaintenanceEventHandler.class,
- DriverEventHandler.class);
- }
+ DefaultDataHandler.class,
+ CommandResultEventHandler.class,
+ OverspeedEventHandler.class,
+ FuelDropEventHandler.class,
+ MotionEventHandler.class,
+ GeofenceEventHandler.class,
+ AlertEventHandler.class,
+ IgnitionEventHandler.class,
+ MaintenanceEventHandler.class,
+ DriverEventHandler.class);
pipeline.addLast(new MainEventHandler());
}