Tunnel attach and detach listeners.

This commit is contained in:
Michael Jumper
2012-03-23 12:09:24 -07:00
parent e13b62a993
commit fc6750da00
2 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package net.sourceforge.guacamole.net.event.listener;
import net.sourceforge.guacamole.net.event.TunnelAttachEvent;
/**
* A listener whose tunnelAttached() hook will fire immediately after a new
* tunnel is attached to a session.
*
* @author Michael Jumper
*/
public interface TunnelAttachListener {
/**
* 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.
*
* @param e The TunnelAttachEvent describing the tunnel being attached and
* any associated credentials.
* @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.
*/
public boolean tunnelAttached(TunnelAttachEvent e);
}

View File

@@ -0,0 +1,26 @@
package net.sourceforge.guacamole.net.event.listener;
import net.sourceforge.guacamole.net.event.TunnelDetachEvent;
/**
* A listener whose tunnelDetached() hook will fire immediately after an
* existing tunnel is detached from a session.
*
* @author Michael Jumper
*/
public interface TunnelDetachListener {
/**
* 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.
*
* @param e The TunnelDetachEvent describing the tunnel being detached and
* any associated credentials.
* @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.
*/
public boolean tunnelDetached(TunnelDetachEvent e);
}