Tunnel attach and detach events.

This commit is contained in:
Michael Jumper
2012-03-23 12:04:08 -07:00
parent fe7de5201a
commit e13b62a993
2 changed files with 74 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
package net.sourceforge.guacamole.net.event;
import net.sourceforge.guacamole.net.GuacamoleTunnel;
import net.sourceforge.guacamole.net.auth.Credentials;
/**
* An event which is triggered whenever a tunnel is being attached to a
* session. The tunnel being attached can be accessed through getTunnel(),
* and the set of all credentials available from the request which is
* attaching the tunnel can be retrieved using getCredentials().
*
* @author Michael Jumper
*/
public class TunnelAttachEvent implements CredentialEvent, TunnelEvent {
/**
* The credentials associated with the request that is attaching the
* tunnel, if any.
*/
private Credentials credentials;
/**
* The tunnel being attached.
*/
private GuacamoleTunnel tunnel;
@Override
public Credentials getCredentials() {
return credentials;
}
@Override
public GuacamoleTunnel getTunnel() {
return tunnel;
}
}

View File

@@ -0,0 +1,37 @@
package net.sourceforge.guacamole.net.event;
import net.sourceforge.guacamole.net.GuacamoleTunnel;
import net.sourceforge.guacamole.net.auth.Credentials;
/**
* An event which is triggered whenever a tunnel is being detached from a
* session. The tunnel being detached can be accessed through getTunnel(),
* and the set of all credentials available from the request which is
* detaching the tunnel can be retrieved using getCredentials().
*
* @author Michael Jumper
*/
public class TunnelDetachEvent implements CredentialEvent, TunnelEvent {
/**
* The credentials associated with the request that is detaching the
* tunnel, if any.
*/
private Credentials credentials;
/**
* The tunnel being detached.
*/
private GuacamoleTunnel tunnel;
@Override
public Credentials getCredentials() {
return credentials;
}
@Override
public GuacamoleTunnel getTunnel() {
return tunnel;
}
}