GUAC-1100: Add getActiveConnections() function to Connectable.

This commit is contained in:
Michael Jumper
2015-02-23 13:04:25 -08:00
parent 6f61300cbc
commit 79130e96fc
12 changed files with 112 additions and 44 deletions

View File

@@ -51,4 +51,13 @@ public interface Connectable {
public GuacamoleSocket connect(GuacamoleClientInformation info)
throws GuacamoleException;
/**
* Returns the number of active connections associated with this object.
* Implementations may simply return 0 if this value is not tracked.
*
* @return
* The number of active connections associated with this object.
*/
public int getActiveConnections();
}

View File

@@ -78,6 +78,11 @@ public class SimpleConnection extends AbstractConnection {
}
@Override
public int getActiveConnections() {
return 0;
}
@Override
public GuacamoleSocket connect(GuacamoleClientInformation info)
throws GuacamoleException {

View File

@@ -86,6 +86,11 @@ public class SimpleConnectionGroup extends AbstractConnectionGroup {
}
@Override
public int getActiveConnections() {
return 0;
}
@Override
public Set<String> getConnectionIdentifiers() {
return connectionIdentifiers;