diff options
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r-- | src/org/traccar/BasePipelineFactory.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index 9f0824b6c..98a327220 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.DriverEventHandler; import org.traccar.events.FuelDropEventHandler; import org.traccar.events.GeofenceEventHandler; import org.traccar.events.IgnitionEventHandler; @@ -67,6 +68,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { private AlertEventHandler alertEventHandler; private IgnitionEventHandler ignitionEventHandler; private MaintenanceEventHandler maintenanceEventHandler; + private DriverEventHandler driverEventHandler; private static final class OpenChannelHandler extends SimpleChannelHandler { @@ -173,6 +175,7 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { alertEventHandler = new AlertEventHandler(); ignitionEventHandler = new IgnitionEventHandler(); maintenanceEventHandler = new MaintenanceEventHandler(); + driverEventHandler = new DriverEventHandler(); } } @@ -270,6 +273,10 @@ public abstract class BasePipelineFactory implements ChannelPipelineFactory { pipeline.addLast("MaintenanceEventHandler", maintenanceEventHandler); } + if (driverEventHandler != null) { + pipeline.addLast("DriverEventHandler", driverEventHandler); + } + pipeline.addLast("mainHandler", new MainEventHandler()); return pipeline; } |