@Override
        public void handleEvent(Object event) throws GuacamoleException {
            if (event instanceof AuthenticationSuccessEvent) {
                if (!delegate.authenticationSucceeded((AuthenticationSuccessEvent) event)) {
                    throw new GuacamoleSecurityException(
                        "listener vetoed successful authentication");
                }
            }
        }
Handles an AuthenticationSuccessEvent by passing the event to the delegate
listener. If the delegate returns false, the adapter throws a GuacamoleException
to veto the authentication success event. All other event types are ignored.

@param event
    An object that describes the event that occurred.

@throws GuacamoleException
     If thrown by the delegate listener.
guacamole/src/main/java/org/apache/guacamole/extension/ListenerFactory.java