aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-13 17:37:31 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-13 17:37:31 +0500
commit51f22a533b0e511bd97da6d46a676ac15a47884d (patch)
tree2034612c196bc741594a4585fc58785cee87826a /src/org/traccar/database
parent5f5c61f17fdf8ecd3e70112b32aaf4a8d04f2335 (diff)
downloadtraccar-server-51f22a533b0e511bd97da6d46a676ac15a47884d.tar.gz
traccar-server-51f22a533b0e511bd97da6d46a676ac15a47884d.tar.bz2
traccar-server-51f22a533b0e511bd97da6d46a676ac15a47884d.zip
Added possibility to forward all events via POST request.
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/NotificationManager.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/database/NotificationManager.java b/src/org/traccar/database/NotificationManager.java
index e618d7ed3..90edce43e 100644
--- a/src/org/traccar/database/NotificationManager.java
+++ b/src/org/traccar/database/NotificationManager.java
@@ -31,6 +31,7 @@ import org.traccar.helper.Log;
import org.traccar.model.Event;
import org.traccar.model.Notification;
import org.traccar.model.Position;
+import org.traccar.notification.NotificationForward;
import org.traccar.notification.NotificationMail;
public class NotificationManager {
@@ -41,8 +42,11 @@ public class NotificationManager {
private final ReadWriteLock notificationsLock = new ReentrantReadWriteLock();
+ private final boolean forward;
+
public NotificationManager(DataManager dataManager) {
this.dataManager = dataManager;
+ forward = Context.getConfig().getBoolean("event.forward.enable");
refresh();
}
@@ -68,6 +72,9 @@ public class NotificationManager {
}
}
}
+ if (forward) {
+ NotificationForward.forwardEvent(event, position);
+ }
}
public void updateEvents(Collection<Event> events, Position position) {