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)
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()
IdentifiablegetIdentifier in interface Identifiablepublic void setIdentifier(String identifier)
IdentifiablesetIdentifier in interface Identifiableidentifier - The identifier to assign.public String getName()
ConnectiongetName in interface Connectionpublic void setName(String name)
ConnectionsetName in interface Connectionname - The name to assign.public String getParentIdentifier()
ConnectiongetParentIdentifier in interface Connectionpublic void setParentIdentifier(String parentIdentifier)
ConnectionsetParentIdentifier in interface ConnectionparentIdentifier - The unique identifier of the parent
ConnectionGroup for this Connection.public org.apache.guacamole.protocol.GuacamoleConfiguration getConfiguration()
ConnectiongetConfiguration in interface Connectionpublic void setConfiguration(org.apache.guacamole.protocol.GuacamoleConfiguration config)
ConnectionsetConfiguration in interface Connectionconfig - The GuacamoleConfiguration to associate with this
Connection.public Map<String,String> getAttributes()
AttributesgetAttributes in interface Attributespublic void setAttributes(Map<String,String> attributes)
AttributessetAttributes in interface Attributesattributes - A map of all attribute identifiers to their corresponding values.public Date getLastActive()
ConnectiongetLastActive in interface Connectionpublic List<? extends ConnectionRecord> getHistory() throws org.apache.guacamole.GuacamoleException
ConnectiongetHistory in interface Connectionorg.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
ConnectiongetSharingProfileIdentifiers in interface Connectionorg.apache.guacamole.GuacamoleException - If an error occurs while fetching the sharing profiles for this
connection.public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info)
throws org.apache.guacamole.GuacamoleException
Connectableconnect in interface Connectableinfo - 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 int getActiveConnections()
ConnectablegetActiveConnections in interface ConnectableCopyright © 2018. All rights reserved.