Package org.apache.guacamole.net.event
Class TunnelCloseEvent
java.lang.Object
org.apache.guacamole.net.event.TunnelCloseEvent
- All Implemented Interfaces:
CredentialEvent
,TunnelEvent
,UserEvent
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 Summary
ConstructorsConstructorDescriptionTunnelCloseEvent
(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
Modifier and TypeMethodDescriptionReturns the AuthenticatedUser identifying the user triggering the event, if any.Returns the current credentials of the user triggering the event, if any.org.apache.guacamole.net.GuacamoleTunnel
Returns the tunnel associated with this event, if any.
-
Constructor Details
-
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 Details
-
getAuthenticatedUser
Description copied from interface:UserEvent
Returns the AuthenticatedUser identifying the user triggering the event, if any.- Specified by:
getAuthenticatedUser
in interfaceUserEvent
- Returns:
- The AuthenticatedUser identifying the user triggering the event, if any, or null if no AuthenticatedUser is associated with the event.
-
getCredentials
Description copied from interface:CredentialEvent
Returns the current credentials of the user triggering the event, if any.- Specified by:
getCredentials
in 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:TunnelEvent
Returns the tunnel associated with this event, if any.- Specified by:
getTunnel
in interfaceTunnelEvent
- Returns:
- The tunnel associated with this event, if any, or null if no tunnel is associated with this event.
-