blob: 8e19e9523240ad23fea13f8f3f9c89778ac4c9d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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;
public class CommandResultEventHandler extends BaseEventHandler {
@Override
protected Collection<Event> analyzePosition(Position position) {
Object commandResult = position.getAttributes().get(Position.KEY_RESULT);
if (commandResult != null) {
Collection<Event> events = new ArrayList<>();
events.add(new Event(Event.TYPE_COMMAND_RESULT, position.getDeviceId(), position.getId()));
return events;
}
return null;
}
}
|