Package org.apache.guacamole.protocol
Class GuacamoleConfiguration
- java.lang.Object
- 
- org.apache.guacamole.protocol.GuacamoleConfiguration
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class GuacamoleConfiguration extends Object implements Serializable All information necessary to complete the initial protocol handshake of a Guacamole session.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description GuacamoleConfiguration()Creates a new, blank GuacamoleConfiguration with its protocol, connection ID, and parameters unset.GuacamoleConfiguration(GuacamoleConfiguration config)Copies the given GuacamoleConfiguration, creating a new, indepedent GuacamoleConfiguration containing the same protocol, connection ID, and parameter values, if any.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConnectionID()Returns the ID of the connection being joined, if any.StringgetParameter(String name)Returns the value set for the parameter with the given name, if any.Set<String>getParameterNames()Returns a set of all currently defined parameter names.Map<String,String>getParameters()Returns a map which contains parameter name/value pairs as key/value pairs.StringgetProtocol()Returns the name of the protocol to be used.voidsetConnectionID(String connectionID)Sets the ID of the connection being joined, if any.voidsetParameter(String name, String value)Sets the value for the parameter with the given name.voidsetParameters(Map<String,String> parameters)Replaces all current parameters with the parameters defined within the given map.voidsetProtocol(String protocol)Sets the name of the protocol to be used.voidunsetParameter(String name)Removes the value set for the parameter with the given name.
 
- 
- 
- 
Constructor Detail- 
GuacamoleConfigurationpublic GuacamoleConfiguration() Creates a new, blank GuacamoleConfiguration with its protocol, connection ID, and parameters unset.
 - 
GuacamoleConfigurationpublic GuacamoleConfiguration(GuacamoleConfiguration config) Copies the given GuacamoleConfiguration, creating a new, indepedent GuacamoleConfiguration containing the same protocol, connection ID, and parameter values, if any.- Parameters:
- config- The GuacamoleConfiguration to copy.
 
 
- 
 - 
Method Detail- 
getConnectionIDpublic String getConnectionID() Returns the ID of the connection being joined, if any. If no connection is being joined, this returns null, and the protocol must be set.- Returns:
- The ID of the connection being joined, or null if no connection is being joined.
 
 - 
setConnectionIDpublic void setConnectionID(String connectionID) Sets the ID of the connection being joined, if any. If no connection is being joined, this value must be omitted.- Parameters:
- connectionID- The ID of the connection being joined.
 
 - 
getProtocolpublic String getProtocol() Returns the name of the protocol to be used.- Returns:
- The name of the protocol to be used.
 
 - 
setProtocolpublic void setProtocol(String protocol) Sets the name of the protocol to be used. If no connection is being joined (a new connection is being established), this value must be set.If a connection is being joined, this value should still be set to ensure that protocol-specific responses like the "required" and "argv" instructions can be understood in their proper context by other code that may consume this GuacamoleConfiguration like ConfiguredGuacamoleSocket.If this value is unavailable or remains unset, it is still possible to join an established connection using setConnectionID(java.lang.String), however protocol-specific responses like the "required" and "argv" instructions might not be possible to handle correctly if the underlying protocol is not made available through some other means to the client receiving those responses.- Parameters:
- protocol- The name of the protocol to be used.
 
 - 
getParameterpublic String getParameter(String name) Returns the value set for the parameter with the given name, if any.- Parameters:
- name- The name of the parameter to return the value for.
- Returns:
- The value of the parameter with the given name, or null if that parameter has not been set.
 
 - 
setParameterpublic void setParameter(String name, String value) Sets the value for the parameter with the given name.- Parameters:
- name- The name of the parameter to set the value for.
- value- The value to set for the parameter with the given name.
 
 - 
unsetParameterpublic void unsetParameter(String name) Removes the value set for the parameter with the given name.- Parameters:
- name- The name of the parameter to remove the value of.
 
 - 
getParameterNamespublic Set<String> getParameterNames() 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().- Returns:
- A set of all currently defined parameter names.
 
 - 
getParameterspublic Map<String,String> getParameters() Returns a map which contains parameter name/value pairs as key/value pairs. Changes to this map will affect the parameters stored within this configuration.- Returns:
- A map which contains all parameter name/value pairs as key/value pairs.
 
 - 
setParameterspublic void setParameters(Map<String,String> parameters) Replaces all current parameters with the parameters defined within the given map. Key/value pairs within the map represent parameter name/value pairs.- Parameters:
- parameters- A map which contains all parameter name/value pairs as key/value pairs.
 
 
- 
 
-