Package org.apache.guacamole.net.auth
Class DelegatingConnectionGroup
- java.lang.Object
-
- org.apache.guacamole.net.auth.DelegatingConnectionGroup
-
- All Implemented Interfaces:
Attributes
,Connectable
,ConnectionGroup
,Identifiable
,ReadableAttributes
- Direct Known Subclasses:
TokenInjectingConnectionGroup
public class DelegatingConnectionGroup extends Object implements ConnectionGroup
ConnectionGroup implementation which simply delegates all function calls to an underlying ConnectionGroup.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.guacamole.net.auth.ConnectionGroup
ConnectionGroup.Type
-
-
Constructor Summary
Constructors Constructor Description DelegatingConnectionGroup(ConnectionGroup connectionGroup)
Wraps the given ConnectionGroup such that all function calls against this DelegatingConnectionGroup will be delegated to it.
-
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.protected ConnectionGroup
getDelegateConnectionGroup()
Returns the underlying ConnectionGroup wrapped by this DelegatingConnectionGroup.String
getIdentifier()
Returns the unique identifier assigned to this object.String
getName()
Returns the name assigned to this ConnectionGroup.String
getParentIdentifier()
Returns the unique identifier of the parent ConnectionGroup for this ConnectionGroup.ConnectionGroup.Type
getType()
Returns the type of this connection.void
setAttributes(Map<String,String> attributes)
Sets the given attributes.void
setIdentifier(String identifier)
Sets the identifier assigned to this object.void
setName(String name)
Sets the name assigned to this ConnectionGroup.void
setParentIdentifier(String parentIdentifier)
Sets the unique identifier of the parent ConnectionGroup for this ConnectionGroup.void
setType(ConnectionGroup.Type type)
Set the type of this ConnectionGroup.
-
-
-
Constructor Detail
-
DelegatingConnectionGroup
public DelegatingConnectionGroup(ConnectionGroup connectionGroup)
Wraps the given ConnectionGroup such that all function calls against this DelegatingConnectionGroup will be delegated to it.- Parameters:
connectionGroup
- The ConnectionGroup to wrap.
-
-
Method Detail
-
getDelegateConnectionGroup
protected ConnectionGroup getDelegateConnectionGroup()
Returns the underlying ConnectionGroup wrapped by this DelegatingConnectionGroup.- Returns:
- The ConnectionGroup wrapped by this DelegatingConnectionGroup.
-
getIdentifier
public String getIdentifier()
Description copied from interface:Identifiable
Returns the unique identifier assigned to this object. All identifiable objects must have a deterministic, unique identifier which may not be null.- Specified by:
getIdentifier
in interfaceIdentifiable
- Returns:
- The unique identifier assigned to this object, which may not be null.
-
setIdentifier
public void setIdentifier(String identifier)
Description copied from interface:Identifiable
Sets the identifier assigned to this object.- Specified by:
setIdentifier
in interfaceIdentifiable
- Parameters:
identifier
- The identifier to assign.
-
getName
public String getName()
Description copied from interface:ConnectionGroup
Returns the name assigned to this ConnectionGroup.- Specified by:
getName
in interfaceConnectionGroup
- Returns:
- The name assigned to this ConnectionGroup.
-
setName
public void setName(String name)
Description copied from interface:ConnectionGroup
Sets the name assigned to this ConnectionGroup.- Specified by:
setName
in interfaceConnectionGroup
- Parameters:
name
- The name to assign.
-
getParentIdentifier
public String getParentIdentifier()
Description copied from interface:ConnectionGroup
Returns the unique identifier of the parent ConnectionGroup for this ConnectionGroup.- Specified by:
getParentIdentifier
in interfaceConnectionGroup
- Returns:
- The unique identifier of the parent ConnectionGroup for this ConnectionGroup.
-
setParentIdentifier
public void setParentIdentifier(String parentIdentifier)
Description copied from interface:ConnectionGroup
Sets the unique identifier of the parent ConnectionGroup for this ConnectionGroup.- Specified by:
setParentIdentifier
in interfaceConnectionGroup
- Parameters:
parentIdentifier
- The unique identifier of the parent ConnectionGroup for this ConnectionGroup.
-
setType
public void setType(ConnectionGroup.Type type)
Description copied from interface:ConnectionGroup
Set the type of this ConnectionGroup.- Specified by:
setType
in interfaceConnectionGroup
- Parameters:
type
- The type of this ConnectionGroup.
-
getType
public ConnectionGroup.Type getType()
Description copied from interface:ConnectionGroup
Returns the type of this connection.- Specified by:
getType
in interfaceConnectionGroup
- Returns:
- the type of this connection.
-
getConnectionIdentifiers
public Set<String> getConnectionIdentifiers() throws org.apache.guacamole.GuacamoleException
Description copied from interface:ConnectionGroup
Returns the identifiers of all readable connections that are children of this connection group.- Specified by:
getConnectionIdentifiers
in interfaceConnectionGroup
- Returns:
- The set of identifiers of all readable connections that are children of this connection group.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the identifiers.
-
getConnectionGroupIdentifiers
public Set<String> getConnectionGroupIdentifiers() throws org.apache.guacamole.GuacamoleException
Description copied from interface:ConnectionGroup
Returns the identifiers of all readable connection groups that are children of this connection group.- Specified by:
getConnectionGroupIdentifiers
in interfaceConnectionGroup
- Returns:
- The set of identifiers of all readable connection groups that are children of this connection group.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while retrieving the identifiers.
-
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.- Specified by:
getAttributes
in interfaceReadableAttributes
- 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.- Specified by:
setAttributes
in interfaceAttributes
- 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.- Specified by:
connect
in interfaceConnectable
- 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
.- Specified by:
connect
in interfaceConnectable
- 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
-
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.- Specified by:
getActiveConnections
in interfaceConnectable
- Returns:
- The number of active connections associated with this object.
-
-