GUACAMOLE-364: listener interfaces now extend a common marker interface

This commit is contained in:
Carl Harris
2017-08-16 06:54:16 -04:00
parent 287ab56f0f
commit 6f89a0b530
5 changed files with 34 additions and 6 deletions

View File

@@ -27,8 +27,7 @@ import org.apache.guacamole.net.event.AuthenticationFailureEvent;
* after a user's authentication attempt fails. Note that this hook cannot * after a user's authentication attempt fails. Note that this hook cannot
* be used to cancel the authentication failure. * be used to cancel the authentication failure.
*/ */
public interface AuthenticationFailureListener { public interface AuthenticationFailureListener extends Listener {
/** /**
* Event hook which fires immediately after a user's authentication attempt * Event hook which fires immediately after a user's authentication attempt
* fails. * fails.

View File

@@ -28,7 +28,7 @@ import org.apache.guacamole.net.event.AuthenticationSuccessEvent;
* the authenticationSucceeded() hook has the opportunity to cancel the * the authenticationSucceeded() hook has the opportunity to cancel the
* authentication and force it to fail. * authentication and force it to fail.
*/ */
public interface AuthenticationSuccessListener { public interface AuthenticationSuccessListener extends Listener {
/** /**
* Event hook which fires immediately after a user's authentication attempt * Event hook which fires immediately after a user's authentication attempt

View File

@@ -0,0 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.guacamole.net.event.listener;
/**
* A marker interface extended by all listener types. This interface is used
* simply to validate that a listener class identified in an extension
* actually implements some listener interface.
*/
public interface Listener {
}

View File

@@ -26,10 +26,10 @@ import org.apache.guacamole.net.event.TunnelCloseEvent;
* A listener whose tunnelClosed() hook will fire immediately after an * A listener whose tunnelClosed() hook will fire immediately after an
* existing tunnel is closed. * existing tunnel is closed.
*/ */
public interface TunnelCloseListener { public interface TunnelCloseListener extends Listener {
/** /**
* Event hook which fires immediately after an existing tunnel is closed. * Event hook which fires immediately before an existing tunnel is closed.
* The return value of this hook dictates whether the tunnel is allowed to * The return value of this hook dictates whether the tunnel is allowed to
* be closed. * be closed.
* *

View File

@@ -26,7 +26,7 @@ import org.apache.guacamole.net.event.TunnelConnectEvent;
* A listener whose tunnelConnected() hook will fire immediately after a new * A listener whose tunnelConnected() hook will fire immediately after a new
* tunnel is connected. * tunnel is connected.
*/ */
public interface TunnelConnectListener { public interface TunnelConnectListener extends Listener {
/** /**
* Event hook which fires immediately after a new tunnel is connected. * Event hook which fires immediately after a new tunnel is connected.