diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationFailureListener.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationFailureListener.java index c110144c6..0a2ec03b3 100644 --- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationFailureListener.java +++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationFailureListener.java @@ -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; } diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationSuccessListener.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationSuccessListener.java index f7fea9d56..5422816c8 100644 --- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationSuccessListener.java +++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/AuthenticationSuccessListener.java @@ -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; } diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelAttachListener.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelAttachListener.java index 7936faef3..e8e6dc7af 100644 --- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelAttachListener.java +++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelAttachListener.java @@ -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; } diff --git a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelDetachListener.java b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelDetachListener.java index 9eea91f50..cc7a84d35 100644 --- a/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelDetachListener.java +++ b/guacamole-ext/src/main/java/net/sourceforge/guacamole/net/event/listener/TunnelDetachListener.java @@ -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; }