Package org.apache.guacamole.net.auth
Class AbstractActiveConnection
- java.lang.Object
-
- org.apache.guacamole.net.auth.AbstractIdentifiable
-
- org.apache.guacamole.net.auth.AbstractActiveConnection
-
- All Implemented Interfaces:
ActiveConnection
,Connectable
,Identifiable
,Shareable<SharingProfile>
public abstract class AbstractActiveConnection extends AbstractIdentifiable implements ActiveConnection
Base implementation of an ActiveConnection, providing storage and simply getters/setters for its main properties.
-
-
Constructor Summary
Constructors Constructor Description AbstractActiveConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConnectionIdentifier()
Returns the identifier of the connection being actively used.String
getRemoteHost()
Returns the hostname or IP address of the remote host that initiated the connection, if known.String
getSharingProfileIdentifier()
Returns the identifier of the sharing profile being actively used.Date
getStartDate()
Returns the date and time the connection began.org.apache.guacamole.net.GuacamoleTunnel
getTunnel()
Returns the connected GuacamoleTunnel being used.String
getUsername()
Returns the name of the user who is using this connection.void
setConnectionIdentifier(String connnectionIdentifier)
Sets the identifier of the connection being actively used.void
setRemoteHost(String remoteHost)
Sets the hostname or IP address of the remote host that initiated the connection.void
setSharingProfileIdentifier(String sharingProfileIdentifier)
Sets the identifier of the sharing profile being actively used.void
setStartDate(Date startDate)
Sets the date and time the connection began.void
setTunnel(org.apache.guacamole.net.GuacamoleTunnel tunnel)
Sets the connected GuacamoleTunnel being used.void
setUsername(String username)
Sets the name of the user who is using this connection.-
Methods inherited from class org.apache.guacamole.net.auth.AbstractIdentifiable
equals, getIdentifier, hashCode, setIdentifier
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.guacamole.net.auth.ActiveConnection
connect, getActiveConnections, isConnectable
-
Methods inherited from interface org.apache.guacamole.net.auth.Connectable
connect
-
Methods inherited from interface org.apache.guacamole.net.auth.Identifiable
getIdentifier, setIdentifier
-
Methods inherited from interface org.apache.guacamole.net.auth.Shareable
getSharingCredentials
-
-
-
-
Method Detail
-
getConnectionIdentifier
public String getConnectionIdentifier()
Description copied from interface:ActiveConnection
Returns the identifier of the connection being actively used. Unlike the other information stored in this object, the connection identifier must be present and MAY NOT be null.- Specified by:
getConnectionIdentifier
in interfaceActiveConnection
- Returns:
- The identifier of the connection being actively used.
-
setConnectionIdentifier
public void setConnectionIdentifier(String connnectionIdentifier)
Description copied from interface:ActiveConnection
Sets the identifier of the connection being actively used.- Specified by:
setConnectionIdentifier
in interfaceActiveConnection
- Parameters:
connnectionIdentifier
- The identifier of the connection being actively used.
-
getSharingProfileIdentifier
public String getSharingProfileIdentifier()
Description copied from interface:ActiveConnection
Returns the identifier of the sharing profile being actively used. If the connection is being accessed directly, this will be null.- Specified by:
getSharingProfileIdentifier
in interfaceActiveConnection
- Returns:
- The identifier of the sharing profile being actively used.
-
setSharingProfileIdentifier
public void setSharingProfileIdentifier(String sharingProfileIdentifier)
Description copied from interface:ActiveConnection
Sets the identifier of the sharing profile being actively used.- Specified by:
setSharingProfileIdentifier
in interfaceActiveConnection
- Parameters:
sharingProfileIdentifier
- The identifier of the sharing profile being actively used.
-
getStartDate
public Date getStartDate()
Description copied from interface:ActiveConnection
Returns the date and time the connection began.- Specified by:
getStartDate
in interfaceActiveConnection
- Returns:
- The date and time the connection began, or null if this information is not available.
-
setStartDate
public void setStartDate(Date startDate)
Description copied from interface:ActiveConnection
Sets the date and time the connection began.- Specified by:
setStartDate
in interfaceActiveConnection
- Parameters:
startDate
- The date and time the connection began, or null if this information is not available.
-
getRemoteHost
public String getRemoteHost()
Description copied from interface:ActiveConnection
Returns the hostname or IP address of the remote host that initiated the connection, if known. If the hostname or IP address is not known, null is returned.- Specified by:
getRemoteHost
in interfaceActiveConnection
- Returns:
- The hostname or IP address of the remote host, or null if this information is not available.
-
setRemoteHost
public void setRemoteHost(String remoteHost)
Description copied from interface:ActiveConnection
Sets the hostname or IP address of the remote host that initiated the connection.- Specified by:
setRemoteHost
in interfaceActiveConnection
- Parameters:
remoteHost
- The hostname or IP address of the remote host, or null if this information is not available.
-
getUsername
public String getUsername()
Description copied from interface:ActiveConnection
Returns the name of the user who is using this connection.- Specified by:
getUsername
in interfaceActiveConnection
- Returns:
- The name of the user who is using this connection, or null if this information is not available.
-
setUsername
public void setUsername(String username)
Description copied from interface:ActiveConnection
Sets the name of the user who is using this connection.- Specified by:
setUsername
in interfaceActiveConnection
- Parameters:
username
- The name of the user who is using this connection, or null if this information is not available.
-
getTunnel
public org.apache.guacamole.net.GuacamoleTunnel getTunnel()
Description copied from interface:ActiveConnection
Returns the connected GuacamoleTunnel being used. This may be null if access to the underlying tunnel is denied.- Specified by:
getTunnel
in interfaceActiveConnection
- Returns:
- The connected GuacamoleTunnel, or null if permission is denied.
-
setTunnel
public void setTunnel(org.apache.guacamole.net.GuacamoleTunnel tunnel)
Description copied from interface:ActiveConnection
Sets the connected GuacamoleTunnel being used.- Specified by:
setTunnel
in interfaceActiveConnection
- Parameters:
tunnel
- The connected GuacamoleTunnel, or null if permission is denied.
-
-