mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	Allow listeners to throw exceptions from within hooks.
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| package net.sourceforge.guacamole.net.event.listener; | ||||
|  | ||||
| import net.sourceforge.guacamole.GuacamoleException; | ||||
| import net.sourceforge.guacamole.net.event.AuthenticationFailureEvent; | ||||
|  | ||||
| /** | ||||
| @@ -17,7 +18,12 @@ public interface AuthenticationFailureListener  { | ||||
|      *  | ||||
|      * @param e The AuthenticationFailureEvent describing the authentication | ||||
|      *          failure that just occurred. | ||||
|      * @throws GuacamoleException If an error occurs while handling the | ||||
|      *                            authentication failure event. Note that | ||||
|      *                            throwing an exception will NOT cause the | ||||
|      *                            authentication failure to be canceled. | ||||
|      */ | ||||
|     public void authenticationFailed(AuthenticationFailureEvent e); | ||||
|     public void authenticationFailed(AuthenticationFailureEvent e) | ||||
|             throws GuacamoleException; | ||||
|      | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package net.sourceforge.guacamole.net.event.listener; | ||||
|  | ||||
| import net.sourceforge.guacamole.GuacamoleException; | ||||
| import net.sourceforge.guacamole.net.event.AuthenticationSuccessEvent; | ||||
|  | ||||
| /** | ||||
| @@ -22,7 +23,12 @@ public interface AuthenticationSuccessListener { | ||||
|      * @return true if the successful authentication attempt should be | ||||
|      *         allowed, or false if the attempt should be denied, causing | ||||
|      *         the attempt to effectively fail. | ||||
|      * @throws GuacamoleException If an error occurs while handling the | ||||
|      *                            authentication success event. Throwing an | ||||
|      *                            exception will also cancel the authentication | ||||
|      *                            success. | ||||
|      */ | ||||
|     public boolean authenticationSucceeded(AuthenticationSuccessEvent e); | ||||
|     public boolean authenticationSucceeded(AuthenticationSuccessEvent e) | ||||
|             throws GuacamoleException; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package net.sourceforge.guacamole.net.event.listener; | ||||
|  | ||||
| import net.sourceforge.guacamole.GuacamoleException; | ||||
| import net.sourceforge.guacamole.net.event.TunnelAttachEvent; | ||||
|  | ||||
| /** | ||||
| @@ -20,7 +21,11 @@ public interface TunnelAttachListener { | ||||
|      * @return true if the tunnel should be allowed to be attached, or false | ||||
|      *         if the attempt should be denied, causing the attempt to | ||||
|      *         effectively fail. | ||||
|      * @throws GuacamoleException If an error occurs while handling the | ||||
|      *                            tunnel attach event. Throwing an exception | ||||
|      *                            will also stop the tunnel from being attached. | ||||
|      */ | ||||
|     public boolean tunnelAttached(TunnelAttachEvent e); | ||||
|     public boolean tunnelAttached(TunnelAttachEvent e) | ||||
|             throws GuacamoleException; | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package net.sourceforge.guacamole.net.event.listener; | ||||
|  | ||||
| import net.sourceforge.guacamole.GuacamoleException; | ||||
| import net.sourceforge.guacamole.net.event.TunnelDetachEvent; | ||||
|  | ||||
| /** | ||||
| @@ -20,7 +21,11 @@ public interface TunnelDetachListener { | ||||
|      * @return true if the tunnel should be allowed to be detached, or false | ||||
|      *         if the attempt should be denied, causing the attempt to | ||||
|      *         effectively fail. | ||||
|      * @throws GuacamoleException If an error occurs while handling the | ||||
|      *                            tunnel detach event. Throwing an exception | ||||
|      *                            will also stop the tunnel from being detached. | ||||
|      */ | ||||
|     public boolean tunnelDetached(TunnelDetachEvent e); | ||||
|     public boolean tunnelDetached(TunnelDetachEvent e) | ||||
|             throws GuacamoleException; | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user