From e8f83c19ccb07c804330696358d4985b0b5b3465 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 26 Nov 2011 18:23:45 -0800 Subject: [PATCH] Renamed and reformatted example, removed unapplicable license terms. --- ...Servlet.java => ExampleTunnelServlet.java} | 32 +++++-------------- 1 file changed, 8 insertions(+), 24 deletions(-) rename guacamole-common/doc/example/{net/sourceforge/guacamole/net/example/DummyGuacamoleTunnelServlet.java => ExampleTunnelServlet.java} (56%) diff --git a/guacamole-common/doc/example/net/sourceforge/guacamole/net/example/DummyGuacamoleTunnelServlet.java b/guacamole-common/doc/example/ExampleTunnelServlet.java similarity index 56% rename from guacamole-common/doc/example/net/sourceforge/guacamole/net/example/DummyGuacamoleTunnelServlet.java rename to guacamole-common/doc/example/ExampleTunnelServlet.java index ead4901ba..d335754f6 100644 --- a/guacamole-common/doc/example/net/sourceforge/guacamole/net/example/DummyGuacamoleTunnelServlet.java +++ b/guacamole-common/doc/example/ExampleTunnelServlet.java @@ -1,6 +1,4 @@ -package net.sourceforge.guacamole.net.example; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import net.sourceforge.guacamole.GuacamoleException; @@ -13,33 +11,19 @@ import net.sourceforge.guacamole.protocol.ConfiguredGuacamoleSocket; import net.sourceforge.guacamole.servlet.GuacamoleSession; import net.sourceforge.guacamole.servlet.GuacamoleTunnelServlet; -/* - * Guacamole - Clientless Remote Desktop - * Copyright (C) 2010 Michael Jumper - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -public class DummyGuacamoleTunnelServlet extends GuacamoleTunnelServlet { +public class ExampleTunnelServlet extends GuacamoleTunnelServlet { @Override - protected GuacamoleTunnel doConnect(HttpServletRequest request) throws GuacamoleException { + protected GuacamoleTunnel doConnect(HttpServletRequest request) + throws GuacamoleException { HttpSession httpSession = request.getSession(true); - String hostname = GuacamoleProperties.getProperty(GuacamoleProperties.GUACD_HOSTNAME); - int port = GuacamoleProperties.getProperty(GuacamoleProperties.GUACD_PORT); + String hostname = GuacamoleProperties.getProperty( + GuacamoleProperties.GUACD_HOSTNAME); + + int port = GuacamoleProperties.getProperty( + GuacamoleProperties.GUACD_PORT); GuacamoleConfiguration config = new GuacamoleConfiguration(); config.setProtocol("vnc");