You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2016/03/20 03:15:30 UTC
[20/50] incubator-guacamole-manual git commit: GUAC-1435: Remove
documentation covering deprecated GuacamoleSession class.
GUAC-1435: Remove documentation covering deprecated GuacamoleSession class.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/commit/c8e80883
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/tree/c8e80883
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/diff/c8e80883
Branch: refs/heads/master
Commit: c8e80883dd36ad432e3971566195d7a56d01035b
Parents: 335cefc
Author: Michael Jumper <mi...@guac-dev.org>
Authored: Tue Dec 15 13:47:46 2015 -0800
Committer: Michael Jumper <mi...@guac-dev.org>
Committed: Tue Dec 15 14:38:06 2015 -0800
----------------------------------------------------------------------
src/chapters/guacamole-common.xml | 51 ++++++++++------------------------
src/chapters/yourown.xml | 14 ++--------
2 files changed, 17 insertions(+), 48 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/blob/c8e80883/src/chapters/guacamole-common.xml
----------------------------------------------------------------------
diff --git a/src/chapters/guacamole-common.xml b/src/chapters/guacamole-common.xml
index 7353cc5..b9cad80 100644
--- a/src/chapters/guacamole-common.xml
+++ b/src/chapters/guacamole-common.xml
@@ -48,33 +48,19 @@
<methodname>doConnect()</methodname> does not create the tunnel,
communication between the JavaScript client and guacd cannot take
place, which is an ideal power to have as an authenticator.</para>
- <para>The <methodname>doConnect()</methodname> function is expected to
- "attach" a <classname>GuacamoleTunnel</classname> to the web
- session, abstracted by <classname>GuacamoleSession</classname>.
- Attaching a tunnel to the session allows future tunnel requests to
- retrieve the same tunnel and use it, thus allowing one tunnel to be
- split across multiple requests. Assuming the
- <methodname>doConnect()</methodname> function successfully
- creates the tunnel, it must then return the created tunnel. The
- already-implemented parts of
- <classname>GuacamoleHTTPTunnelServlet</classname> then return
- the unique identifier of this tunnel to the JavaScript client,
- allowing its own tunnel implementation to continue to communicate
- with the tunnel existing on the Java side.</para>
- <para>Instances of <classname>GuacamoleTunnel</classname> are created
- associated with a <classname>GuacamoleSocket</classname>, which is
- the abstract interface surrounding the low-level connection to
- guacd. Overall, there is a socket
- (<classname>GuacamoleSocket</classname>) which provides a TCP
- connection to guacd. This socket is exposed to
- <classname>GuacamoleTunnel</classname>, which provides abstract
- protocol access around what is actually (but secretly, through the
- abstraction of the API) a TCP socket. The
- <classname>GuacamoleSession</classname> allows instances of
- <classname>GuacamoleTunnel</classname> to be shared across
- requests, and <classname>GuacamoleHTTPTunnelServlet</classname>
- pulls these tunnels from the session as necessary to fulfill
- requests made by the JavaScript client.</para>
+ <para>The <methodname>doConnect()</methodname> function is expected to return a new
+ <classname>GuacamoleTunnel</classname>, but it is completely up to the
+ implementation to decide how that tunnel is to be created. The already-implemented parts
+ of <classname>GuacamoleHTTPTunnelServlet</classname> then return the unique identifier
+ of this tunnel to the JavaScript client, allowing its own tunnel implementation to
+ continue to communicate with the tunnel existing on the Java side.</para>
+ <para>Instances of <classname>GuacamoleTunnel</classname> are created associated with a
+ <classname>GuacamoleSocket</classname>, which is the abstract interface surrounding
+ the low-level connection to guacd. Overall, there is a socket
+ (<classname>GuacamoleSocket</classname>) which provides a TCP connection to guacd.
+ This socket is exposed to <classname>GuacamoleTunnel</classname>, which provides
+ abstract protocol access around what is actually (but secretly, through the abstraction
+ of the API) a TCP socket.</para>
<para>The Guacamole web application extends this tunnel servlet in order
to implement authentication at the lowest possible level,
effectively prohibiting communication between the client and any
@@ -92,15 +78,8 @@
// Connect to guacd here (this is a STUB)
GuacamoleSocket socket;
- // Establish the tunnel using the connected socket
- GuacamoleTunnel tunnel = new GuacamoleTunnel(socket);
-
- // Attach tunnel to session
- GuacamoleSession session = new GuacamoleSession(httpSession);
- session.attachTunnel(tunnel);
-
- // Return pre-attached tunnel
- return tunnel;
+ // Return a new tunnel which uses the connected socket
+ return new GuacamoleTunnel(socket);
}
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/blob/c8e80883/src/chapters/yourown.xml
----------------------------------------------------------------------
diff --git a/src/chapters/yourown.xml b/src/chapters/yourown.xml
index 0464e24..8dc9fe0 100644
--- a/src/chapters/yourown.xml
+++ b/src/chapters/yourown.xml
@@ -359,7 +359,6 @@
package org.glyptodon.guacamole.net.example;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
import org.glyptodon.guacamole.GuacamoleException;
import org.glyptodon.guacamole.net.GuacamoleSocket;
import org.glyptodon.guacamole.net.GuacamoleTunnel;
@@ -367,7 +366,6 @@ import org.glyptodon.guacamole.net.InetGuacamoleSocket;
import org.glyptodon.guacamole.protocol.ConfiguredGuacamoleSocket;
import org.glyptodon.guacamole.protocol.GuacamoleConfiguration;
import org.glyptodon.guacamole.servlet.GuacamoleHTTPTunnelServlet;
-import org.glyptodon.guacamole.servlet.GuacamoleSession;
public class TutorialGuacamoleTunnelServlet
extends GuacamoleHTTPTunnelServlet {
@@ -389,16 +387,8 @@ public class TutorialGuacamoleTunnelServlet
config
);
- // Establish the tunnel using the connected socket
- GuacamoleTunnel tunnel = new GuacamoleTunnel(socket);
-
- // Attach tunnel to session
- HttpSession httpSession = request.getSession(true);
- GuacamoleSession session = new GuacamoleSession(httpSession);
- session.attachTunnel(tunnel);
-
- // Return pre-attached tunnel
- return tunnel;
+ // Return a new tunnel which uses the connected socket
+ return new GuacamoleTunnel(socket);;
}