Class TunnelConnectEvent

java.lang.Object
org.apache.guacamole.net.event.TunnelConnectEvent
All Implemented Interfaces:
CredentialEvent, TunnelEvent, UserEvent

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

If a Listener throws a GuacamoleException when handling an event of this type, the tunnel connection is effectively vetoed and will be subsequently closed.

  • Constructor Details

    • TunnelConnectEvent

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

    • 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.