public class APIConnectionWrapper extends Object implements Connection
| Constructor and Description |
|---|
APIConnectionWrapper(APIConnection apiConnection)
Creates a new APIConnectionWrapper which wraps the given APIConnection
as a Connection.
|
| Modifier and Type | Method and Description |
|---|---|
GuacamoleTunnel |
connect(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 connection.
|
GuacamoleConfiguration |
getConfiguration()
Returns the GuacamoleConfiguration associated with this Connection.
|
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.
|
String |
getName()
Returns the name assigned to this Connection.
|
String |
getParentIdentifier()
Returns the unique identifier of the parent ConnectionGroup for
this Connection.
|
void |
setAttributes(Map<String,String> attributes)
Sets the given attributes.
|
void |
setConfiguration(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 APIConnectionWrapper(APIConnection apiConnection)
apiConnection - The APIConnection to wrap.public String getName()
ConnectiongetName in interface Connectionpublic void setName(String name)
ConnectionsetName in interface Connectionname - The name to assign.public String getIdentifier()
IdentifiablegetIdentifier in interface Identifiablepublic void setIdentifier(String identifier)
IdentifiablesetIdentifier in interface Identifiableidentifier - The identifier 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 int getActiveConnections()
ConnectablegetActiveConnections in interface Connectablepublic GuacamoleConfiguration getConfiguration()
ConnectiongetConfiguration in interface Connectionpublic void setConfiguration(GuacamoleConfiguration config)
ConnectionsetConfiguration in interface Connectionconfig - The GuacamoleConfiguration to associate with this
Connection.public Map<String,String> getAttributes()
ConnectiongetAttributes in interface Connectionpublic void setAttributes(Map<String,String> attributes)
ConnectionsetAttributes in interface Connectionattributes - A map of all attribute identifiers to their corresponding values.public GuacamoleTunnel connect(GuacamoleClientInformation info) throws GuacamoleException
Connectableconnect in interface Connectableinfo - Information associated with the connecting client.GuacamoleException - If an error occurs while connecting to guacd, or if permission to
connect is denied.public List<? extends ConnectionRecord> getHistory() throws GuacamoleException
ConnectiongetHistory in interface ConnectionGuacamoleException - If an error occurs while reading the history
of this connection, or if permission is
denied.Copyright © 2016. All rights reserved.