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 {
private String password;
private int outputBPP;
private boolean compressStream;
private boolean swapRedAndBlue;
private String hostname;
private int port;
public GuacamoleConfiguration(ServletContext context) throws GuacamoleException {
super(context);
password = context.getInitParameter("password");
outputBPP = readIntParameter("output-bpp", 8, 8, 24);
compressStream = readBooleanParameter("compress-stream", false);
swapRedAndBlue = readBooleanParameter("swap-red-blue", false);
hostname = context.getInitParameter("hostname");
port = readIntParameter("port", null);
}
public int getOutputBPP() {
return outputBPP;
public int getPort() {
return port;
}
public String getPassword() {
return password;
public String getHostname() {
return hostname;
}
public boolean getCompressStream() {
return compressStream;
}
public boolean getSwapRedAndBlue() {
return swapRedAndBlue;
}
}

View File

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