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()
Connection
getName
in interface Connection
public void setName(String name)
Connection
setName
in interface Connection
name
- The name to assign.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 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 int getActiveConnections()
Connectable
getActiveConnections
in interface Connectable
public GuacamoleConfiguration getConfiguration()
Connection
getConfiguration
in interface Connection
public void setConfiguration(GuacamoleConfiguration config)
Connection
setConfiguration
in interface Connection
config
- The GuacamoleConfiguration to associate with this
Connection.public Map<String,String> getAttributes()
Connection
getAttributes
in interface Connection
public void setAttributes(Map<String,String> attributes)
Connection
setAttributes
in interface Connection
attributes
- A map of all attribute identifiers to their corresponding values.public GuacamoleTunnel connect(GuacamoleClientInformation info) throws GuacamoleException
Connectable
connect
in interface Connectable
info
- 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
Connection
getHistory
in interface Connection
GuacamoleException
- If an error occurs while reading the history
of this connection, or if permission is
denied.Copyright © 2017. All rights reserved.