Class TunnelCloseEvent

  • All Implemented Interfaces:
    CredentialEvent, TunnelEvent, UserEvent

    public class TunnelCloseEvent
    extends Object
    implements UserEvent, CredentialEvent, TunnelEvent
    An event which is triggered whenever a tunnel is being closed. The tunnel being closed can be accessed through getTunnel(), and the UserContext associated with the request which is closing the tunnel can be retrieved with getUserContext().

    If a Listener throws a GuacamoleException when handling an event of this type, the request to close the tunnel is effectively vetoed and will remain connected.

    • Constructor Detail

      • TunnelCloseEvent

        public TunnelCloseEvent​(AuthenticatedUser authenticatedUser,
                                Credentials credentials,
                                org.apache.guacamole.net.GuacamoleTunnel tunnel)
        Creates a new TunnelCloseEvent which represents the closing of the given tunnel via a request associated with the given credentials.
        Parameters:
        authenticatedUser - The AuthenticatedUser associated with the user that is closing the tunnel, if any.
        credentials - The credentials associated with the request that closed the tunnel. Note that these credentials are not necessarily the same as the credentials provided when the user authenticated.
        tunnel - The tunnel being closed.
    • Method Detail

      • getAuthenticatedUser

        public AuthenticatedUser getAuthenticatedUser()
        Description copied from interface: UserEvent
        Returns the AuthenticatedUser identifying the user triggering the event, if any.
        Specified by:
        getAuthenticatedUser in interface UserEvent
        Returns:
        The AuthenticatedUser identifying the user triggering the event, if any, or null if no AuthenticatedUser is associated with the event.
      • getCredentials

        public Credentials getCredentials()
        Description copied from interface: CredentialEvent
        Returns the current credentials of the user triggering the event, if any.
        Specified by:
        getCredentials in interface CredentialEvent
        Returns:
        The current credentials of the user triggering the event, if any, or null if no credentials are associated with the event.
      • getTunnel

        public org.apache.guacamole.net.GuacamoleTunnel getTunnel()
        Description copied from interface: TunnelEvent
        Returns the tunnel associated with this event, if any.
        Specified by:
        getTunnel in interface TunnelEvent
        Returns:
        The tunnel associated with this event, if any, or null if no tunnel is associated with this event.