aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-03-09 20:02:51 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-03-09 20:02:51 -0800
commit69ebfe201e6399340545e167110e87fdd4e16a6b (patch)
tree435cf0e2fb2b3858bdbf7360d75afe2c66f3145d /src/org/traccar/BasePipelineFactory.java
parentc7e9f996ed7d183442a7dd2fbbc5c9329981f261 (diff)
downloadtrackermap-server-69ebfe201e6399340545e167110e87fdd4e16a6b.tar.gz
trackermap-server-69ebfe201e6399340545e167110e87fdd4e16a6b.tar.bz2
trackermap-server-69ebfe201e6399340545e167110e87fdd4e16a6b.zip
Refactor driver event handler
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 57e7322aa..f8800ada2 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -59,8 +59,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private boolean eventsEnabled;
private int timeout;
- private DriverEventHandler driverEventHandler;
-
public BasePipelineFactory(TrackerServer server, String protocol) {
this.server = server;
eventsEnabled = Context.getConfig().getBoolean(Keys.EVENT_ENABLE);
@@ -68,10 +66,6 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
if (timeout == 0) {
timeout = Context.getConfig().getInteger(Keys.SERVER_TIMEOUT);
}
-
- if (eventsEnabled) {
- driverEventHandler = new DriverEventHandler();
- }
}
protected abstract void addProtocolHandlers(PipelineBuilder pipeline);
@@ -152,7 +146,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
Main.getInjector().getInstance(AlertEventHandler.class),
Main.getInjector().getInstance(IgnitionEventHandler.class),
Main.getInjector().getInstance(MaintenanceEventHandler.class),
- driverEventHandler);
+ Main.getInjector().getInstance(DriverEventHandler.class));
}
pipeline.addLast(new MainEventHandler());