diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-29 22:38:33 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-29 22:38:33 -0800 |
commit | 449941043a8303e1cca7c63b28e84b6b53c6871c (patch) | |
tree | 82ccd6430eb6f6fe6e199fb2b7fb46aef9e1f3bb /src/main/java/org/traccar/BasePipelineFactory.java | |
parent | bdb4aea7ddb7f525d5c476077a88d905d261fdb8 (diff) | |
download | trackermap-server-449941043a8303e1cca7c63b28e84b6b53c6871c.tar.gz trackermap-server-449941043a8303e1cca7c63b28e84b6b53c6871c.tar.bz2 trackermap-server-449941043a8303e1cca7c63b28e84b6b53c6871c.zip |
Migrate more keys
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/main/java/org/traccar/BasePipelineFactory.java | 32 |
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()); } |