aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Context.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r--src/org/traccar/Context.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java
index ebe700221..0bb18b675 100644
--- a/src/org/traccar/Context.java
+++ b/src/org/traccar/Context.java
@@ -35,6 +35,7 @@ import org.traccar.helper.Log;
import org.traccar.location.LocationProvider;
import org.traccar.location.MozillaLocationProvider;
import org.traccar.location.OpenCellIdLocationProvider;
+import org.traccar.notification.EventForwarder;
import org.traccar.web.WebServer;
public final class Context {
@@ -120,6 +121,12 @@ public final class Context {
return ASYNC_HTTP_CLIENT;
}
+ private static EventForwarder eventForwarder;
+
+ public static EventForwarder getEventForvarder() {
+ return eventForwarder;
+ }
+
public static void init(String[] arguments) throws Exception {
config = new Config();
@@ -210,6 +217,10 @@ public final class Context {
serverManager = new ServerManager();
+ if (config.getBoolean("event.forward.enable")) {
+ eventForwarder = new EventForwarder();
+ }
+
}
public static void init(IdentityManager testIdentityManager) {