Package org.apache.guacamole.net.auth
Interface Connection
-
- All Superinterfaces:
Attributes
,Connectable
,Identifiable
,ReadableAttributes
- All Known Implementing Classes:
AbstractConnection
,DelegatingConnection
,SimpleConnection
,TokenInjectingConnection
public interface Connection extends Identifiable, Connectable, Attributes
Represents a pairing of a GuacamoleConfiguration with a unique, human-readable identifier, and abstracts the connection process. The backing GuacamoleConfiguration may be intentionally obfuscated or tokenized to protect sensitive configuration information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description org.apache.guacamole.protocol.GuacamoleConfiguration
getConfiguration()
Returns the GuacamoleConfiguration associated with this Connection.default ActivityRecordSet<ConnectionRecord>
getConnectionHistory()
Returns an ActivityRecordSet containing ConnectionRecords that represent the usage history of this Connection, including any active users.default List<? extends ConnectionRecord>
getHistory()
Deprecated.This function has been deprecated in favor ofgetConnectionHistory()
, which returns the connection history as an ActivityRecordSet that can be easily sorted and filtered.Date
getLastActive()
Returns the date and time that this connection was last used.String
getName()
Returns the name assigned to this Connection.String
getParentIdentifier()
Returns the unique identifier of the parent ConnectionGroup for this Connection.Set<String>
getSharingProfileIdentifiers()
Returns identifiers of all readable sharing profiles that can be used to join this connection when it is active.void
setConfiguration(org.apache.guacamole.protocol.GuacamoleConfiguration config)
Sets the GuacamoleConfiguration associated with this Connection.void
setName(String name)
Sets the name assigned to this Connection.void
setParentIdentifier(String parentIdentifier)
Sets the unique identifier of the parent ConnectionGroup for this Connection.-
Methods inherited from interface org.apache.guacamole.net.auth.Attributes
setAttributes
-
Methods inherited from interface org.apache.guacamole.net.auth.Connectable
connect, connect, getActiveConnections
-
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
Methods inherited from interface org.apache.guacamole.net.auth.ReadableAttributes
getAttributes
-
-
-
-
Method Detail
-
getName
String getName()
Returns the name assigned to this Connection.- Returns:
- The name assigned to this Connection.
-
setName
void setName(String name)
Sets the name assigned to this Connection.- Parameters:
name
- The name to assign.
-
getParentIdentifier
String getParentIdentifier()
Returns the unique identifier of the parent ConnectionGroup for this Connection.- Returns:
- The unique identifier of the parent ConnectionGroup for this Connection.
-
setParentIdentifier
void setParentIdentifier(String parentIdentifier)
Sets the unique identifier of the parent ConnectionGroup for this Connection.- Parameters:
parentIdentifier
- The unique identifier of the parent ConnectionGroup for this Connection.
-
getConfiguration
org.apache.guacamole.protocol.GuacamoleConfiguration getConfiguration()
Returns the GuacamoleConfiguration associated with this Connection. Note that because configurations may contain sensitive information, some data in this configuration may be omitted or tokenized.- Returns:
- The GuacamoleConfiguration associated with this Connection.
-
setConfiguration
void setConfiguration(org.apache.guacamole.protocol.GuacamoleConfiguration config)
Sets the GuacamoleConfiguration associated with this Connection.- Parameters:
config
- The GuacamoleConfiguration to associate with this Connection.
-
getLastActive
Date getLastActive()
Returns the date and time that this connection was last used. If the connection was never used, the time that the connection was last used is unknown, or this information is not visible to the current user, this may be null.- Returns:
- The date and time this connection was last used, or null if this information is unavailable or inapplicable.
-
getHistory
@Deprecated default List<? extends ConnectionRecord> getHistory() throws org.apache.guacamole.GuacamoleException
Deprecated.This function has been deprecated in favor ofgetConnectionHistory()
, which returns the connection history as an ActivityRecordSet that can be easily sorted and filtered. While the getHistory() method is provided for API compatibility, new implementations should avoid use of this method and, instead, implement the getConnectionHistory() method.Returns a list of ConnectionRecords representing the usage history of this Connection, including any active users. ConnectionRecords in this list will be sorted in descending order of end time (active connections are first), and then in descending order of start time (newer connections are first). If connection history tracking is not implemented this method should throw GuacamoleUnsupportedException.- Returns:
- A list of ConnectionRecrods representing the usage history of this Connection.
- Throws:
org.apache.guacamole.GuacamoleException
- If history tracking is not implemented, if an error occurs while reading the history of this connection, or if permission is denied.
-
getConnectionHistory
default ActivityRecordSet<ConnectionRecord> getConnectionHistory() throws org.apache.guacamole.GuacamoleException
Returns an ActivityRecordSet containing ConnectionRecords that represent the usage history of this Connection, including any active users. ConnectionRecords in this list will be sorted in descending order of end time (active connections are first), and then in descending order of start time (newer connections are first). If connection history tracking has not been implemented, or has been implemented using the deprecatedgetHistory()
method, this function should throw GuacamoleUnsupportedExpcetion.- Returns:
- An ActivityRecordSet containing ConnectionRecords representing the usage history of this Connection.
- Throws:
org.apache.guacamole.GuacamoleException
- If history tracking is not implemented, if an error occurs while reading the history of this connection, or if permission is denied.
-
getSharingProfileIdentifiers
Set<String> getSharingProfileIdentifiers() throws org.apache.guacamole.GuacamoleException
Returns identifiers of all readable sharing profiles that can be used to join this connection when it is active. The level of access granted to a joining user is dictated by the connection parameters associated with the sharing profile, not necessarily the parameters of the primary connection being joined.- Returns:
- A Set of identifiers representing the sharing profiles for this connection.
- Throws:
org.apache.guacamole.GuacamoleException
- If an error occurs while fetching the sharing profiles for this connection.
-
-