From 3f6f92cedd969e741e65bb6e14737b98722b214e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 17 Jul 2015 16:28:36 +1200 Subject: Start re-factoring commands --- src/org/traccar/database/ConnectionManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/org/traccar/database/ConnectionManager.java') diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java index dc125d7b0..39ec465e6 100644 --- a/src/org/traccar/database/ConnectionManager.java +++ b/src/org/traccar/database/ConnectionManager.java @@ -31,7 +31,7 @@ import org.traccar.model.Position; public class ConnectionManager { - private final Map activeDevices = new HashMap<>(); + private final Map activeDevices = new HashMap<>(); private final Map positions = new HashMap<>(); private final Map> listeners = new HashMap<>(); @@ -47,12 +47,12 @@ public class ConnectionManager { } } - public void setActiveDevice(String uniqueId, Protocol protocol, Channel channel, SocketAddress remoteAddress) { - activeDevices.put(uniqueId, new ActiveDevice(uniqueId, protocol, channel, remoteAddress)); + public void setActiveDevice(long deviceId, Protocol protocol, Channel channel, SocketAddress remoteAddress) { + activeDevices.put(deviceId, new ActiveDevice(deviceId, protocol, channel, remoteAddress)); } - public ActiveDevice getActiveDevice(String uniqueId) { - return activeDevices.get(uniqueId); + public ActiveDevice getActiveDevice(long deviceId) { + return activeDevices.get(deviceId); } public synchronized void update(Position position) { -- cgit v1.2.3