Package org.apache.guacamole.net.event
Class TunnelCloseEvent
- java.lang.Object
-
- org.apache.guacamole.net.event.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
Listenerthrows a GuacamoleException when handling an event of this type, the request to close the tunnel is effectively vetoed and will remain connected.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthenticatedUsergetAuthenticatedUser()Returns the AuthenticatedUser identifying the user triggering the event, if any.CredentialsgetCredentials()Returns the current credentials of the user triggering the event, if any.org.apache.guacamole.net.GuacamoleTunnelgetTunnel()Returns the tunnel associated with this event, if any.
-
-
-
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:UserEventReturns the AuthenticatedUser identifying the user triggering the event, if any.- Specified by:
getAuthenticatedUserin interfaceUserEvent- 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:CredentialEventReturns the current credentials of the user triggering the event, if any.- Specified by:
getCredentialsin interfaceCredentialEvent- 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:TunnelEventReturns the tunnel associated with this event, if any.- Specified by:
getTunnelin interfaceTunnelEvent- Returns:
- The tunnel associated with this event, if any, or null if no tunnel is associated with this event.
-
-