Rename attach/detach listeners to connect/close.

This commit is contained in:
Michael Jumper
2012-03-23 15:31:03 -07:00
parent c2eb0744ac
commit 0285fe371a
2 changed files with 23 additions and 22 deletions

View File

@@ -4,28 +4,28 @@ import net.sourceforge.guacamole.GuacamoleException;
import net.sourceforge.guacamole.net.event.TunnelCloseEvent;
/**
* A listener whose tunnelDetached() hook will fire immediately after an
* existing tunnel is detached from a session.
* A listener whose tunnelClosed() hook will fire immediately after an
* existing tunnel is closed.
*
* @author Michael Jumper
*/
public interface TunnelDetachListener {
public interface TunnelCloseListener {
/**
* Event hook which fires immediately after an existing tunnel is detached
* from a session. The return value of this hook dictates whether the
* tunnel is allowed to be detached.
* Event hook which fires immediately after an existing tunnel is closed.
* The return value of this hook dictates whether the tunnel is allowed to
* be closed.
*
* @param e The TunnelCloseEvent describing the tunnel being detached and
* @param e The TunnelCloseEvent describing the tunnel being closed and
* any associated credentials.
* @return true if the tunnel should be allowed to be detached, or false
* @return true if the tunnel should be allowed to be closed, 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.
* tunnel close event. Throwing an exception
* will also stop the tunnel from being closed.
*/
public boolean tunnelDetached(TunnelCloseEvent e)
public boolean tunnelClosed(TunnelCloseEvent e)
throws GuacamoleException;
}

View File

@@ -4,28 +4,29 @@ import net.sourceforge.guacamole.GuacamoleException;
import net.sourceforge.guacamole.net.event.TunnelConnectEvent;
/**
* A listener whose tunnelAttached() hook will fire immediately after a new
* tunnel is attached to a session.
* A listener whose tunnelConnected() hook will fire immediately after a new
* tunnel is connected.
*
* @author Michael Jumper
*/
public interface TunnelAttachListener {
public interface TunnelConnectListener {
/**
* Event hook which fires immediately after a new tunnel is attached to a
* session. The return value of this hook dictates whether the tunnel is
* allowed to be attached.
* Event hook which fires immediately after a new tunnel is connected.
* The return value of this hook dictates whether the tunnel is made visible
* to the session.
*
* @param e The TunnelConnectEvent describing the tunnel being attached and
* @param e The TunnelConnectEvent describing the tunnel being connected and
* any associated credentials.
* @return true if the tunnel should be allowed to be attached, or false
* @return true if the tunnel should be allowed to be connected, 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.
* tunnel connect event. Throwing an exception
* will also stop the tunnel from being made
* visible to the session.
*/
public boolean tunnelAttached(TunnelConnectEvent e)
public boolean tunnelConnected(TunnelConnectEvent e)
throws GuacamoleException;
}