diff options
Diffstat (limited to 'src/org/traccar/BaseEventHandler.java')
-rw-r--r-- | src/org/traccar/BaseEventHandler.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/org/traccar/BaseEventHandler.java b/src/org/traccar/BaseEventHandler.java index 3e3317f0a..16d911dac 100644 --- a/src/org/traccar/BaseEventHandler.java +++ b/src/org/traccar/BaseEventHandler.java @@ -1,5 +1,7 @@ package org.traccar; +import java.util.Collection; + import org.traccar.model.Device; import org.traccar.model.Event; import org.traccar.model.Position; @@ -23,13 +25,15 @@ public abstract class BaseEventHandler extends BaseDataHandler { } } - Event event = analizePosition(position); - if (event != null) { - Context.getConnectionManager().updateEvent(event, position); + Collection<Event> events = analizePosition(position); + if (events != null) { + for (Event event : events) { + Context.getNotificationManager().updateEvent(event, position); + } } return position; } - protected abstract Event analizePosition(Position position); + protected abstract Collection<Event> analizePosition(Position position); } |