aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/events/CommandResultEventHandler.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-14 18:05:05 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-14 18:05:05 +0500
commitb588b3c723cad4629dcecbce8983933f7ff2a255 (patch)
treeee1ed23c7c02ded8ca92c904e6f4f21aacfda8d8 /src/org/traccar/events/CommandResultEventHandler.java
parent185c0830e17b6969977026d4be27e34878bb3db9 (diff)
downloadtrackermap-server-b588b3c723cad4629dcecbce8983933f7ff2a255.tar.gz
trackermap-server-b588b3c723cad4629dcecbce8983933f7ff2a255.tar.bz2
trackermap-server-b588b3c723cad4629dcecbce8983933f7ff2a255.zip
- Overlapping geofences
- Simplified user-device link
Diffstat (limited to 'src/org/traccar/events/CommandResultEventHandler.java')
-rw-r--r--src/org/traccar/events/CommandResultEventHandler.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/traccar/events/CommandResultEventHandler.java b/src/org/traccar/events/CommandResultEventHandler.java
index 23c62566a..9dbdb4b4c 100644
--- a/src/org/traccar/events/CommandResultEventHandler.java
+++ b/src/org/traccar/events/CommandResultEventHandler.java
@@ -1,5 +1,8 @@
package org.traccar.events;
+import java.util.ArrayList;
+import java.util.Collection;
+
import org.traccar.BaseEventHandler;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -7,10 +10,12 @@ import org.traccar.model.Position;
public class CommandResultEventHandler extends BaseEventHandler {
@Override
- protected Event analizePosition(Position position) {
+ protected Collection<Event> analizePosition(Position position) {
Object commandResult = position.getAttributes().get(Position.KEY_RESULT);
if (commandResult != null) {
- return new Event(Event.TYPE_COMMAND_RESULT, position.getDeviceId(), position.getId());
+ Collection<Event> events = new ArrayList<>();
+ events.add(new Event(Event.TYPE_COMMAND_RESULT, position.getDeviceId(), position.getId()));
+ return events;
}
return null;
}