aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-11 07:27:19 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-11 07:27:19 -0700
commit5b269c0e309b70866ad167fb148eafcbad5a8b26 (patch)
tree670c7f46e8d63735cdedee07e853337786a07c8a /src/main/java/org/traccar/MainModule.java
parent8177c9b5ebd1a337fa97b93a31e8772f7b21c356 (diff)
downloadtrackermap-server-5b269c0e309b70866ad167fb148eafcbad5a8b26.tar.gz
trackermap-server-5b269c0e309b70866ad167fb148eafcbad5a8b26.tar.bz2
trackermap-server-5b269c0e309b70866ad167fb148eafcbad5a8b26.zip
Inject event forwarder
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r--src/main/java/org/traccar/MainModule.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index f6621a18e..e3f693444 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -25,6 +25,7 @@ import org.traccar.broadcast.BroadcastService;
import org.traccar.config.Config;
import org.traccar.config.Keys;
import org.traccar.database.LdapProvider;
+import org.traccar.notification.EventForwarder;
import org.traccar.session.ConnectionManager;
import org.traccar.database.DataManager;
import org.traccar.database.DeviceManager;
@@ -269,4 +270,12 @@ public class MainModule extends AbstractModule {
return null;
}
+ @Provides
+ public static EventForwarder provideEventForwarder(Config config) {
+ if (config.hasKey(Keys.EVENT_FORWARD_URL)) {
+ return new EventForwarder(config);
+ }
+ return null;
+ }
+
}