public class LocalEnvironment extends Object implements Environment
GUACD_HOSTNAME, GUACD_PORT, GUACD_SSL| Constructor and Description |
|---|
LocalEnvironment()
Creates a new Environment, initializing that environment based on the
location of GUACAMOLE_HOME and the contents of guacamole.properties.
|
| Modifier and Type | Method and Description |
|---|---|
GuacamoleProxyConfiguration |
getDefaultGuacamoleProxyConfiguration()
Returns the connection information which should be used, by default, to
connect to guacd when establishing a remote desktop connection.
|
File |
getGuacamoleHome()
Returns the Guacamole home directory as determined when this Environment
object was created.
|
<Type> Type |
getProperty(GuacamoleProperty<Type> property)
Given a GuacamoleProperty, parses and returns the value set for that
property in guacamole.properties, if any.
|
<Type> Type |
getProperty(GuacamoleProperty<Type> property,
Type defaultValue)
Given a GuacamoleProperty, parses and returns the value set for that
property in guacamole.properties, if any.
|
ProtocolInfo |
getProtocol(String name)
Returns the protocol having the given name.
|
Map<String,ProtocolInfo> |
getProtocols()
Returns a map of all available protocols, where each key is the name of
that protocol as would be passed to guacd during connection.
|
<Type> Type |
getRequiredProperty(GuacamoleProperty<Type> property)
Given a GuacamoleProperty, parses and returns the value set for that
property in guacamole.properties.
|
public LocalEnvironment()
throws org.apache.guacamole.GuacamoleException
org.apache.guacamole.GuacamoleException - If an error occurs while determining the
environment of this Guacamole instance.public File getGuacamoleHome()
EnvironmentgetGuacamoleHome in interface Environmentpublic <Type> Type getProperty(GuacamoleProperty<Type> property) throws org.apache.guacamole.GuacamoleException
EnvironmentgetProperty in interface EnvironmentType - The type that the given property is parsed into.property - The property to read from guacamole.properties.org.apache.guacamole.GuacamoleException - If an error occurs while parsing the value
for the given property in
guacamole.properties.public <Type> Type getProperty(GuacamoleProperty<Type> property, Type defaultValue) throws org.apache.guacamole.GuacamoleException
EnvironmentgetProperty in interface EnvironmentType - The type that the given property is parsed into.property - The property to read from guacamole.properties.defaultValue - The value to return if no value was given in
guacamole.properties.org.apache.guacamole.GuacamoleException - If an error occurs while parsing the value
for the given property in
guacamole.properties.public <Type> Type getRequiredProperty(GuacamoleProperty<Type> property) throws org.apache.guacamole.GuacamoleException
EnvironmentgetRequiredProperty in interface EnvironmentType - The type that the given property is parsed into.property - The property to read from guacamole.properties.org.apache.guacamole.GuacamoleException - If an error occurs while parsing the value
for the given property in
guacamole.properties, or if the property is
not specified.public Map<String,ProtocolInfo> getProtocols()
EnvironmentgetProtocols in interface Environmentpublic ProtocolInfo getProtocol(String name)
EnvironmentgetProtocol in interface Environmentname - The name of the protocol.public GuacamoleProxyConfiguration getDefaultGuacamoleProxyConfiguration() throws org.apache.guacamole.GuacamoleException
EnvironmentgetDefaultGuacamoleProxyConfiguration in interface Environmentorg.apache.guacamole.GuacamoleException - If the the connection information for guacd cannot be
retrieved.Copyright © 2017. All rights reserved.