Interface ActiveConnection

    • Method Detail

      • getConnectionIdentifier

        String getConnectionIdentifier()
        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.
        Returns:
        The identifier of the connection being actively used.
      • setConnectionIdentifier

        void setConnectionIdentifier​(String connnectionIdentifier)
        Sets the identifier of the connection being actively used.
        Parameters:
        connnectionIdentifier - The identifier of the connection being actively used.
      • getSharingProfileIdentifier

        String getSharingProfileIdentifier()
        Returns the identifier of the sharing profile being actively used. If the connection is being accessed directly, this will be null.
        Returns:
        The identifier of the sharing profile being actively used.
      • setSharingProfileIdentifier

        void setSharingProfileIdentifier​(String sharingProfileIdentifier)
        Sets the identifier of the sharing profile being actively used.
        Parameters:
        sharingProfileIdentifier - The identifier of the sharing profile being actively used.
      • getStartDate

        Date getStartDate()
        Returns the date and time the connection began.
        Returns:
        The date and time the connection began, or null if this information is not available.
      • setStartDate

        void setStartDate​(Date startDate)
        Sets the date and time the connection began.
        Parameters:
        startDate - The date and time the connection began, or null if this information is not available.
      • getRemoteHost

        String getRemoteHost()
        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.
        Returns:
        The hostname or IP address of the remote host, or null if this information is not available.
      • setRemoteHost

        void setRemoteHost​(String remoteHost)
        Sets the hostname or IP address of the remote host that initiated the connection.
        Parameters:
        remoteHost - The hostname or IP address of the remote host, or null if this information is not available.
      • getUsername

        String getUsername()
        Returns the name of the user who is using this connection.
        Returns:
        The name of the user who is using this connection, or null if this information is not available.
      • setUsername

        void setUsername​(String username)
        Sets the name of the user who is using this connection.
        Parameters:
        username - The name of the user who is using this connection, or null if this information is not available.
      • getTunnel

        org.apache.guacamole.net.GuacamoleTunnel getTunnel()
        Returns the connected GuacamoleTunnel being used. This may be null if access to the underlying tunnel is denied.
        Returns:
        The connected GuacamoleTunnel, or null if permission is denied.
      • setTunnel

        void setTunnel​(org.apache.guacamole.net.GuacamoleTunnel tunnel)
        Sets the connected GuacamoleTunnel being used.
        Parameters:
        tunnel - The connected GuacamoleTunnel, or null if permission is denied.
      • connect

        default org.apache.guacamole.net.GuacamoleTunnel connect​(org.apache.guacamole.protocol.GuacamoleClientInformation info,
                                                                 Map<String,​String> tokens)
                                                          throws org.apache.guacamole.GuacamoleException
        Description copied from interface: Connectable
        Establishes a connection to guacd using the information associated with this object. The connection will be provided the given client information. Implementations which support parameter tokens should apply the given tokens when configuring the connection, such as with a TokenFilter.
        Specified by:
        connect in interface Connectable
        Parameters:
        info - Information associated with the connecting client.
        tokens - A Map containing the token names and corresponding values to be applied as parameter tokens when establishing the connection. If the implementation does not support parameter tokens, this Map may be ignored.
        Returns:
        A fully-established GuacamoleTunnel.
        Throws:
        org.apache.guacamole.GuacamoleException - If an error occurs while connecting to guacd, or if permission to connect is denied.
        See Also:
        Parameter Tokens
      • getActiveConnections

        default int getActiveConnections()
        Description copied from interface: Connectable
        Returns the number of active connections associated with this object. Implementations may simply return 0 if this value is not tracked.
        Specified by:
        getActiveConnections in interface Connectable
        Returns:
        The number of active connections associated with this object.