Add parameter list/remove.

This commit is contained in:
Michael Jumper
2013-02-14 02:02:25 -08:00
parent fc4fa4004d
commit a86f1a7c7f

View File

@@ -38,8 +38,10 @@ package net.sourceforge.guacamole.protocol;
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
import java.io.Serializable; import java.io.Serializable;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set;
/** /**
* All information necessary to complete the initial protocol handshake of a * All information necessary to complete the initial protocol handshake of a
@@ -90,4 +92,24 @@ public class GuacamoleConfiguration implements Serializable {
parameters.put(name, value); parameters.put(name, value);
} }
/**
* Removes the value set for the parameter with the given name.
*
* @param name The name of the parameter to remove the value of.
*/
public void unsetParameter(String name) {
parameters.remove(name);
}
/**
* Returns a set of all currently defined parameter names. Each name
* corresponds to a parameter that has a value set on this
* GuacamoleConfiguration via setParameter().
*
* @return A set of all currently defined parameter names.
*/
public Set<String> getParameterNames() {
return Collections.unmodifiableSet(parameters.keySet());
}
} }