From 147829ad7c2e980de6b6d7636945f8b6151cb90e Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 26 Mar 2012 13:46:20 -0700 Subject: [PATCH] Should be able to retrieve the configuration associated with a socket. --- .../protocol/ConfiguredGuacamoleSocket.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/protocol/ConfiguredGuacamoleSocket.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/protocol/ConfiguredGuacamoleSocket.java index 192c32ca2..d546bc4e3 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/protocol/ConfiguredGuacamoleSocket.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/protocol/ConfiguredGuacamoleSocket.java @@ -58,6 +58,7 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation; public class ConfiguredGuacamoleSocket implements GuacamoleSocket { private GuacamoleSocket socket; + private GuacamoleConfiguration config; /** * Creates a new ConfiguredGuacamoleSocket which uses the given @@ -70,7 +71,8 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket { * @throws GuacamoleException If an error occurs while completing the * initial protocol handshake. */ - public ConfiguredGuacamoleSocket(GuacamoleSocket socket, GuacamoleConfiguration config) throws GuacamoleException { + public ConfiguredGuacamoleSocket(GuacamoleSocket socket, + GuacamoleConfiguration config) throws GuacamoleException { this.socket = socket; @@ -106,6 +108,17 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket { } + /** + * Returns the GuacamoleConfiguration used to configure this + * ConfiguredGuacamoleSocket. + * + * @return The GuacamoleConfiguration used to configure this + * ConfiguredGuacamoleSocket. + */ + public GuacamoleConfiguration getConfiguration() { + return config; + } + @Override public GuacamoleWriter getWriter() { return socket.getWriter();