Should be able to retrieve the configuration associated with a socket.

This commit is contained in:
Michael Jumper
2012-03-26 13:46:20 -07:00
parent 5027be97bc
commit 147829ad7c

View File

@@ -58,6 +58,7 @@ import net.sourceforge.guacamole.protocol.GuacamoleInstruction.Operation;
public class ConfiguredGuacamoleSocket implements GuacamoleSocket { public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
private GuacamoleSocket socket; private GuacamoleSocket socket;
private GuacamoleConfiguration config;
/** /**
* Creates a new ConfiguredGuacamoleSocket which uses the given * 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 * @throws GuacamoleException If an error occurs while completing the
* initial protocol handshake. * initial protocol handshake.
*/ */
public ConfiguredGuacamoleSocket(GuacamoleSocket socket, GuacamoleConfiguration config) throws GuacamoleException { public ConfiguredGuacamoleSocket(GuacamoleSocket socket,
GuacamoleConfiguration config) throws GuacamoleException {
this.socket = socket; 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 @Override
public GuacamoleWriter getWriter() { public GuacamoleWriter getWriter() {
return socket.getWriter(); return socket.getWriter();