diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-07-14 08:56:45 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 08:56:45 +1200 |
commit | 82fd4d09aa7ac37bf2eb1857b12efbd3bc773a94 (patch) | |
tree | 59e55fd0c4f9bffa4c140982c7f040bb8636ad9b /src/org/traccar/Context.java | |
parent | d154cb277fe2f7b5dfe6bdaee1a013729bbf22eb (diff) | |
parent | 7ce8c4ecf82828920926f81f55cbc4fb833ef259 (diff) | |
download | trackermap-server-82fd4d09aa7ac37bf2eb1857b12efbd3bc773a94.tar.gz trackermap-server-82fd4d09aa7ac37bf2eb1857b12efbd3bc773a94.tar.bz2 trackermap-server-82fd4d09aa7ac37bf2eb1857b12efbd3bc773a94.zip |
Merge pull request #2110 from Abyss777/master
Added possibility to forward all events
Diffstat (limited to 'src/org/traccar/Context.java')
-rw-r--r-- | src/org/traccar/Context.java | 11 |
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) { |