diff options
author | Abyss777 <abyss@fox5.ru> | 2016-06-15 14:22:23 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-06-15 14:22:23 +0500 |
commit | f08bb5adf425269a00e760c669bdeeadc8c7e112 (patch) | |
tree | c2215abadf212d5e56def143e906683f8390f677 /src/org/traccar/BaseEventHandler.java | |
parent | 8ddcc66dc6441ce8f8a122d09872c143922fa0f0 (diff) | |
download | trackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.tar.gz trackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.tar.bz2 trackermap-server-f08bb5adf425269a00e760c669bdeeadc8c7e112.zip |
- Work only with cached devices from everywhere
- Some optimization
Diffstat (limited to 'src/org/traccar/BaseEventHandler.java')
-rw-r--r-- | src/org/traccar/BaseEventHandler.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/BaseEventHandler.java b/src/org/traccar/BaseEventHandler.java index 16d911dac..78542b33a 100644 --- a/src/org/traccar/BaseEventHandler.java +++ b/src/org/traccar/BaseEventHandler.java @@ -14,10 +14,16 @@ public abstract class BaseEventHandler extends BaseDataHandler { return isLastPosition; } + private Device device; + + public Device getDevice() { + return device; + } + @Override protected Position handlePosition(Position position) { - Device device = Context.getDataManager().getDeviceById(position.getDeviceId()); + device = Context.getDataManager().getDeviceById(position.getDeviceId()); if (device != null) { long lastPositionId = device.getPositionId(); if (position.getId() == lastPositionId) { |