mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUAC-1132: Modify API to support listing of active connections and host information.
This commit is contained in:
@@ -24,6 +24,7 @@ package org.glyptodon.guacamole.auth.jdbc.connection;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import org.glyptodon.guacamole.net.GuacamoleSocket;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
||||
|
||||
/**
|
||||
@@ -61,6 +62,12 @@ public class ModeledConnectionRecord implements ConnectionRecord {
|
||||
return model.getEndDate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRemoteHost() {
|
||||
// STUB
|
||||
return "STUB";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsername() {
|
||||
return model.getUsername();
|
||||
@@ -71,4 +78,9 @@ public class ModeledConnectionRecord implements ConnectionRecord {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleSocket getActiveSocket() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ import java.util.Date;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connection.ModeledConnection;
|
||||
import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup;
|
||||
import org.glyptodon.guacamole.auth.jdbc.user.AuthenticatedUser;
|
||||
import org.glyptodon.guacamole.net.GuacamoleSocket;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
||||
|
||||
|
||||
@@ -162,6 +163,12 @@ public class ActiveConnectionRecord implements ConnectionRecord {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRemoteHost() {
|
||||
// STUB
|
||||
return "STUB";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsername() {
|
||||
return user.getUser().getIdentifier();
|
||||
@@ -175,4 +182,10 @@ public class ActiveConnectionRecord implements ConnectionRecord {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuacamoleSocket getActiveSocket() {
|
||||
// STUB
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -28,10 +28,13 @@ import org.glyptodon.guacamole.auth.jdbc.connectiongroup.ConnectionGroupDirector
|
||||
import org.glyptodon.guacamole.auth.jdbc.connection.ConnectionDirectory;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.glyptodon.guacamole.GuacamoleException;
|
||||
import org.glyptodon.guacamole.auth.jdbc.base.RestrictedObject;
|
||||
import org.glyptodon.guacamole.net.auth.Connection;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionGroup;
|
||||
import org.glyptodon.guacamole.net.auth.ConnectionRecord;
|
||||
import org.glyptodon.guacamole.net.auth.Directory;
|
||||
import org.glyptodon.guacamole.net.auth.User;
|
||||
|
||||
@@ -114,4 +117,10 @@ public class UserContext extends RestrictedObject
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ConnectionRecord> getActiveConnections() throws GuacamoleException {
|
||||
// STUB
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user