public class DelegatingConnection extends Object implements Connection
Constructor and Description |
---|
DelegatingConnection(Connection connection)
Wraps the given Connection such that all function calls against this
DelegatingConnection will be delegated to it.
|
Modifier and Type | Method and 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.
|
org.apache.guacamole.protocol.GuacamoleConfiguration |
getConfiguration()
Returns the GuacamoleConfiguration associated with this Connection.
|
protected Connection |
getDelegateConnection()
Returns the underlying Connection wrapped by this DelegatingConnection.
|
List<? extends ConnectionRecord> |
getHistory()
Returns a list of ConnectionRecords representing the usage history
of this Connection, including any active users.
|
String |
getIdentifier()
Returns the unique identifier assigned to this object.
|
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 |
setAttributes(Map<String,String> attributes)
Sets the given attributes.
|
void |
setConfiguration(org.apache.guacamole.protocol.GuacamoleConfiguration config)
Sets the GuacamoleConfiguration associated with this Connection.
|
void |
setIdentifier(String identifier)
Sets the identifier assigned to this object.
|
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.
|
public DelegatingConnection(Connection connection)
connection
- The Connection to wrap.protected Connection getDelegateConnection()
public String getIdentifier()
Identifiable
getIdentifier
in interface Identifiable
public void setIdentifier(String identifier)
Identifiable
setIdentifier
in interface Identifiable
identifier
- The identifier to assign.public String getName()
Connection
getName
in interface Connection
public void setName(String name)
Connection
setName
in interface Connection
name
- The name to assign.public String getParentIdentifier()
Connection
getParentIdentifier
in interface Connection
public void setParentIdentifier(String parentIdentifier)
Connection
setParentIdentifier
in interface Connection
parentIdentifier
- The unique identifier of the parent
ConnectionGroup for this Connection.public org.apache.guacamole.protocol.GuacamoleConfiguration getConfiguration()
Connection
getConfiguration
in interface Connection
public void setConfiguration(org.apache.guacamole.protocol.GuacamoleConfiguration config)
Connection
setConfiguration
in interface Connection
config
- The GuacamoleConfiguration to associate with this
Connection.public Map<String,String> getAttributes()
Attributes
getAttributes
in interface Attributes
public void setAttributes(Map<String,String> attributes)
Attributes
setAttributes
in interface Attributes
attributes
- A map of all attribute identifiers to their corresponding values.public Date getLastActive()
Connection
getLastActive
in interface Connection
public List<? extends ConnectionRecord> getHistory() throws org.apache.guacamole.GuacamoleException
Connection
getHistory
in interface Connection
org.apache.guacamole.GuacamoleException
- If an error occurs while reading the history
of this connection, or if permission is
denied.public Set<String> getSharingProfileIdentifiers() throws org.apache.guacamole.GuacamoleException
Connection
getSharingProfileIdentifiers
in interface Connection
org.apache.guacamole.GuacamoleException
- If an error occurs while fetching the sharing profiles for this
connection.@Deprecated public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info) throws org.apache.guacamole.GuacamoleException
Connectable
connect
in interface Connectable
info
- Information associated with the connecting client.org.apache.guacamole.GuacamoleException
- If an error occurs while connecting to guacd, or if permission to
connect is denied.public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info, Map<String,String> tokens) throws org.apache.guacamole.GuacamoleException
Connectable
TokenFilter
.connect
in interface Connectable
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.org.apache.guacamole.GuacamoleException
- If an error occurs while connecting to guacd, or if permission to
connect is denied.public int getActiveConnections()
Connectable
getActiveConnections
in interface Connectable
Copyright © 2020. All rights reserved.