Class SimpleConnectionGroup
- java.lang.Object
-
- org.apache.guacamole.net.auth.AbstractIdentifiable
-
- org.apache.guacamole.net.auth.AbstractConnectionGroup
-
- org.apache.guacamole.net.auth.simple.SimpleConnectionGroup
-
- All Implemented Interfaces:
Attributes
,Connectable
,ConnectionGroup
,Identifiable
,ReadableAttributes
public class SimpleConnectionGroup extends AbstractConnectionGroup
An extremely simple read-only implementation of a ConnectionGroup which returns the connection and connection group identifiers it was constructed with. Load balancing across this connection group is not allowed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.guacamole.net.auth.ConnectionGroup
ConnectionGroup.Type
-
-
Constructor Summary
Constructors Constructor Description SimpleConnectionGroup(String name, String identifier, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers)
Creates a new SimpleConnectionGroup having the given name and identifier which will expose the given contents.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.apache.guacamole.net.GuacamoleTunnel
connect(org.apache.guacamole.protocol.GuacamoleClientInformation info)
Deprecated.org.apache.guacamole.net.GuacamoleTunnel
connect(org.apache.guacamole.protocol.GuacamoleClientInformation info, Map<String,String> tokens)
Establishes a connection to guacd using the information associated with this object.int
getActiveConnections()
Returns the number of active connections associated with this object.Map<String,String>
getAttributes()
Returns all attributes associated with this object.Set<String>
getConnectionGroupIdentifiers()
Returns the identifiers of all readable connection groups that are children of this connection group.Set<String>
getConnectionIdentifiers()
Returns the identifiers of all readable connections that are children of this connection group.void
setAttributes(Map<String,String> attributes)
Sets the given attributes.-
Methods inherited from class org.apache.guacamole.net.auth.AbstractConnectionGroup
getName, getParentIdentifier, getType, setName, setParentIdentifier, setType
-
Methods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifier
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
-
-
-
Constructor Detail
-
SimpleConnectionGroup
public SimpleConnectionGroup(String name, String identifier, Collection<String> connectionIdentifiers, Collection<String> connectionGroupIdentifiers)
Creates a new SimpleConnectionGroup having the given name and identifier which will expose the given contents.- Parameters:
name
- The name to associate with this connection group.identifier
- The identifier to associate with this connection group.connectionIdentifiers
- The connection identifiers to expose when requested.connectionGroupIdentifiers
- The connection group identifiers to expose when requested.
-
-
Method Detail
-
getActiveConnections
public int getActiveConnections()
Description copied from interface:Connectable
Returns the number of active connections associated with this object. Implementations may simply return 0 if this value is not tracked.- Returns:
- The number of active connections associated with this object.
-
getConnectionIdentifiers
public Set<String> getConnectionIdentifiers()
Description copied from interface:ConnectionGroup
Returns the identifiers of all readable connections that are children of this connection group.- Returns:
- The set of identifiers of all readable connections that are children of this connection group.
-
getConnectionGroupIdentifiers
public Set<String> getConnectionGroupIdentifiers()
Description copied from interface:ConnectionGroup
Returns the identifiers of all readable connection groups that are children of this connection group.- Returns:
- The set of identifiers of all readable connection groups that are children of this connection group.
-
getAttributes
public Map<String,String> getAttributes()
Description copied from interface:ReadableAttributes
Returns all attributes associated with this object. The returned map may not be modifiable.- Returns:
- A map of all attribute identifiers to their corresponding values, for all attributes associated with this object, which may not be modifiable.
-
setAttributes
public void setAttributes(Map<String,String> attributes)
Description copied from interface:Attributes
Sets the given attributes. If an attribute within the map is not supported, it will simply be dropped. Any attributes not within the given map will be left untouched. Attributes which are not declared within the associated UserContext MUST NOT be submitted, but other extensions may manipulate the declared attributes through decorate() and redecorate(). Implementations may optionally allow storage of unsupported attributes. Extensions which rely on other extensions to store their attribute values should verify that such storage is supported by first testing that the attribute value is retrievable via getAttributes() after being set.- Parameters:
attributes
- A map of all attribute identifiers to their corresponding values.
-
connect
@Deprecated public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info) throws org.apache.guacamole.GuacamoleException
Deprecated.Description copied from interface:Connectable
Establishes a connection to guacd using the information associated with this object. The connection will be provided the given client information.- Parameters:
info
- Information associated with the connecting client.- Returns:
- A fully-established GuacamoleTunnel.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while connecting to guacd, or if permission to connect is denied.
-
connect
public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info, Map<String,String> tokens) throws org.apache.guacamole.GuacamoleException
Description copied from interface:Connectable
Establishes a connection to guacd using the information associated with this object. The connection will be provided the given client information. Implementations which support parameter tokens should apply the given tokens when configuring the connection, such as with aTokenFilter
.- Parameters:
info
- Information associated with the connecting client.tokens
- A Map containing the token names and corresponding values to be applied as parameter tokens when establishing the connection. If the implementation does not support parameter tokens, this Map may be ignored.- Returns:
- A fully-established GuacamoleTunnel.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while connecting to guacd, or if permission to connect is denied.- See Also:
- Parameter Tokens
-
-