Hostname/port configuration options

This commit is contained in:
Michael Jumper
2010-09-21 19:58:13 +00:00
parent 81cb2d60a3
commit 50355ab353
2 changed files with 10 additions and 23 deletions

View File

@@ -24,36 +24,23 @@ import net.sourceforge.guacamole.GuacamoleException;
public class GuacamoleConfiguration extends Configuration { public class GuacamoleConfiguration extends Configuration {
private String password; private String hostname;
private int outputBPP; private int port;
private boolean compressStream;
private boolean swapRedAndBlue;
public GuacamoleConfiguration(ServletContext context) throws GuacamoleException { public GuacamoleConfiguration(ServletContext context) throws GuacamoleException {
super(context); super(context);
password = context.getInitParameter("password"); hostname = context.getInitParameter("hostname");
outputBPP = readIntParameter("output-bpp", 8, 8, 24); port = readIntParameter("port", null);
compressStream = readBooleanParameter("compress-stream", false);
swapRedAndBlue = readBooleanParameter("swap-red-blue", false);
} }
public int getOutputBPP() { public int getPort() {
return outputBPP; return port;
} }
public String getPassword() { public String getHostname() {
return password; return hostname;
} }
public boolean getCompressStream() {
return compressStream;
}
public boolean getSwapRedAndBlue() {
return swapRedAndBlue;
}
} }

View File

@@ -98,8 +98,8 @@ public class GuacamoleSession {
client = new SessionClient( client = new SessionClient(
new GuacamoleClient ( new GuacamoleClient (
"localhost", // Temporarily hard coded config.getHostname(),
1234 config.getPort()
) )
); );