diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/bwlehrpool/bwlp_guac/TunnelListener.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/de/bwlehrpool/bwlp_guac/TunnelListener.java b/src/main/java/de/bwlehrpool/bwlp_guac/TunnelListener.java index ed3aaa3..14f9c3a 100644 --- a/src/main/java/de/bwlehrpool/bwlp_guac/TunnelListener.java +++ b/src/main/java/de/bwlehrpool/bwlp_guac/TunnelListener.java @@ -23,10 +23,11 @@ public class TunnelListener implements Listener { return userTunnelCount.get(username) != null; } } - + @Override public void handleEvent(Object event) throws GuacamoleException { Integer count; + int total; if (event instanceof TunnelConnectEvent) { String username = Util.getUsername((TunnelConnectEvent)event); synchronized (userTunnelCount) { @@ -37,8 +38,9 @@ public class TunnelListener implements Listener { count++; } userTunnelCount.put(username, count); + total = userTunnelCount.size(); } - LOGGER.info("User " + username + " connected to a tunnel, count: " + count); + LOGGER.info("User " + username + " connected to a tunnel, count: " + count + ", total: " + total); } else if (event instanceof TunnelCloseEvent) { String username = Util.getUsername((TunnelCloseEvent)event); synchronized (userTunnelCount) { @@ -52,8 +54,9 @@ public class TunnelListener implements Listener { } else { count = 0; } + total = userTunnelCount.size(); } - LOGGER.info("User " + username + " closed a tunnel, count: " + count); + LOGGER.info("User " + username + " closed a tunnel, count: " + count + ", total: " + total); } } |