net.sourceforge.guacamole.servlet
Class GuacamoleSession

java.lang.Object
  extended by net.sourceforge.guacamole.servlet.GuacamoleSession

public class GuacamoleSession
extends Object

Provides abstract access to the tunnels associated with a Guacamole session.

Author:
Michael Jumper

Constructor Summary
GuacamoleSession(javax.servlet.http.HttpSession session)
          Creates a new GuacamoleSession, storing and retrieving tunnels from the given HttpSession.
 
Method Summary
 void attachTunnel(GuacamoleTunnel tunnel)
          Attaches the given tunnel to this GuacamoleSession.
 void detachTunnel(GuacamoleTunnel tunnel)
          Detaches the given tunnel to this GuacamoleSession.
 GuacamoleTunnel getTunnel(String tunnelUUID)
          Returns the tunnel with the given UUID attached to this GuacamoleSession, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GuacamoleSession

public GuacamoleSession(javax.servlet.http.HttpSession session)
                 throws GuacamoleException
Creates a new GuacamoleSession, storing and retrieving tunnels from the given HttpSession. Note that the true Guacamole session is tied to the HttpSession provided, thus creating a new GuacamoleSession does not create a new Guacamole session; it merely creates a new object for accessing the tunnels of an existing Guacamole session represented by the provided HttpSession.

Parameters:
session - The HttpSession to use as tunnel storage.
Throws:
GuacamoleException - If session is null.
Method Detail

attachTunnel

public void attachTunnel(GuacamoleTunnel tunnel)
Attaches the given tunnel to this GuacamoleSession.

Parameters:
tunnel - The tunnel to attach to this GucacamoleSession.

detachTunnel

public void detachTunnel(GuacamoleTunnel tunnel)
Detaches the given tunnel to this GuacamoleSession.

Parameters:
tunnel - The tunnel to detach to this GucacamoleSession.

getTunnel

public GuacamoleTunnel getTunnel(String tunnelUUID)
Returns the tunnel with the given UUID attached to this GuacamoleSession, if any.

Parameters:
tunnelUUID - The UUID of an attached tunnel.
Returns:
The tunnel corresponding to the given UUID, if attached, or null if no such tunnel is attached.


Copyright © 2013. All Rights Reserved.