Package org.apache.guacamole.net.auth
Interface Connection
- All Superinterfaces:
Attributes
,Connectable
,Identifiable
,Nameable
,ReadableAttributes
- All Known Implementing Classes:
AbstractConnection
,DelegatingConnection
,SimpleConnection
,TokenInjectingConnection
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
Modifier and TypeMethodDescriptionorg.apache.guacamole.protocol.GuacamoleConfiguration
Returns the GuacamoleConfiguration associated with this Connection.default ActivityRecordSet
<ConnectionRecord> Returns an ActivityRecordSet containing ConnectionRecords that represent the usage history of this Connection, including any active users.default List
<? extends ConnectionRecord> Deprecated.Returns the date and time that this connection was last used.Returns the unique identifier of the parent ConnectionGroup for this Connection.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
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 Details
-
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
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.GuacamoleExceptionDeprecated.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.GuacamoleExceptionReturns 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
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.
-
getConnectionHistory()
, which returns the connection history as an ActivityRecordSet that can be easily sorted and filtered.