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()
Environment
getGuacamoleHome
in interface Environment
public <Type> Type getProperty(GuacamoleProperty<Type> property) throws org.apache.guacamole.GuacamoleException
Environment
getProperty
in interface Environment
Type
- 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
Environment
getProperty
in interface Environment
Type
- 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
Environment
getRequiredProperty
in interface Environment
Type
- 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()
Environment
getProtocols
in interface Environment
public ProtocolInfo getProtocol(String name)
Environment
getProtocol
in interface Environment
name
- The name of the protocol.public GuacamoleProxyConfiguration getDefaultGuacamoleProxyConfiguration() throws org.apache.guacamole.GuacamoleException
Environment
getDefaultGuacamoleProxyConfiguration
in interface Environment
org.apache.guacamole.GuacamoleException
- If the the connection information for guacd cannot be
retrieved.Copyright © 2018. All rights reserved.