public class SimpleConnection extends AbstractConnection
Constructor and Description |
---|
SimpleConnection()
Creates a completely uninitialized SimpleConnection.
|
SimpleConnection(String name,
String identifier,
org.apache.guacamole.protocol.GuacamoleConfiguration config)
Creates a new SimpleConnection having the given identifier and
GuacamoleConfiguration.
|
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.
|
List<ConnectionRecord> |
getHistory()
Returns a list of ConnectionRecords representing the usage history
of this Connection, including any active users.
|
Date |
getLastActive()
Returns the date and time that this connection was last used.
|
void |
setAttributes(Map<String,String> attributes)
Sets the given attributes.
|
getConfiguration, getName, getParentIdentifier, getSharingProfileIdentifiers, setConfiguration, setName, setParentIdentifier
equals, getIdentifier, hashCode, setIdentifier
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getIdentifier, setIdentifier
public SimpleConnection()
public SimpleConnection(String name, String identifier, org.apache.guacamole.protocol.GuacamoleConfiguration config)
name
- The name to associate with this connection.identifier
- The identifier to associate with this connection.config
- The configuration describing how to connect to this
connection.public int getActiveConnections()
Connectable
public Map<String,String> getAttributes()
Attributes
public void setAttributes(Map<String,String> attributes)
Attributes
attributes
- A map of all attribute identifiers to their corresponding values.public org.apache.guacamole.net.GuacamoleTunnel connect(org.apache.guacamole.protocol.GuacamoleClientInformation info) throws org.apache.guacamole.GuacamoleException
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 Date getLastActive()
Connection
public List<ConnectionRecord> getHistory() throws org.apache.guacamole.GuacamoleException
Connection
org.apache.guacamole.GuacamoleException
- If an error occurs while reading the history
of this connection, or if permission is
denied.Copyright © 2018. All rights reserved.