mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUAC-1427: Deprecate and remove use of guacamole-common's GuacamoleSession, storing tunnels directly within GuacamoleHTTPTunnelServlet instead.
This commit is contained in:
@@ -23,7 +23,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;
|
||||
@@ -32,7 +31,6 @@ import org.glyptodon.guacamole.net.SimpleGuacamoleTunnel;
|
||||
import org.glyptodon.guacamole.protocol.ConfiguredGuacamoleSocket;
|
||||
import org.glyptodon.guacamole.protocol.GuacamoleConfiguration;
|
||||
import org.glyptodon.guacamole.servlet.GuacamoleHTTPTunnelServlet;
|
||||
import org.glyptodon.guacamole.servlet.GuacamoleSession;
|
||||
|
||||
/**
|
||||
* Simple tunnel example with hard-coded configuration parameters.
|
||||
@@ -44,8 +42,6 @@ public class DummyGuacamoleTunnelServlet extends GuacamoleHTTPTunnelServlet {
|
||||
@Override
|
||||
protected GuacamoleTunnel doConnect(HttpServletRequest request) throws GuacamoleException {
|
||||
|
||||
HttpSession httpSession = request.getSession(true);
|
||||
|
||||
// guacd connection information
|
||||
String hostname = "localhost";
|
||||
int port = 4822;
|
||||
@@ -65,11 +61,6 @@ public class DummyGuacamoleTunnelServlet extends GuacamoleHTTPTunnelServlet {
|
||||
|
||||
// Create tunnel from now-configured socket
|
||||
GuacamoleTunnel tunnel = new SimpleGuacamoleTunnel(socket);
|
||||
|
||||
// Attach tunnel
|
||||
GuacamoleSession session = new GuacamoleSession(httpSession);
|
||||
session.attachTunnel(tunnel);
|
||||
|
||||
return tunnel;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user