net.sourceforge.guacamole.properties
Class GuacamoleProperties

java.lang.Object
  extended by net.sourceforge.guacamole.properties.GuacamoleProperties

public class GuacamoleProperties
extends Object

Simple utility class for reading properties from the guacamole.properties file in the root of the classpath.

Author:
Michael Jumper

Field Summary
static StringGuacamoleProperty GUACD_HOSTNAME
          The hostname of the server where guacd (the Guacamole proxy server) is running.
static IntegerGuacamoleProperty GUACD_PORT
          The port that guacd (the Guacamole proxy server) is listening on.
 
Method Summary
static
<Type> Type
getProperty(GuacamoleProperty<Type> property)
          Given a GuacamoleProperty, parses and returns the value set for that property in guacamole.properties, if any.
static
<Type> Type
getRequiredProperty(GuacamoleProperty<Type> property)
          Given a GuacamoleProperty, parses and returns the value set for that property in guacamole.properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GUACD_HOSTNAME

public static final StringGuacamoleProperty GUACD_HOSTNAME
The hostname of the server where guacd (the Guacamole proxy server) is running.


GUACD_PORT

public static final IntegerGuacamoleProperty GUACD_PORT
The port that guacd (the Guacamole proxy server) is listening on.

Method Detail

getProperty

public static <Type> Type getProperty(GuacamoleProperty<Type> property)
                        throws GuacamoleException
Given a GuacamoleProperty, parses and returns the value set for that property in guacamole.properties, if any.

Type Parameters:
Type - The type that the given property is parsed into.
Parameters:
property - The property to read from guacamole.properties.
Returns:
The parsed value of the property as read from guacamole.properties.
Throws:
GuacamoleException - If an error occurs while parsing the value for the given property in guacamole.properties.

getRequiredProperty

public static <Type> Type getRequiredProperty(GuacamoleProperty<Type> property)
                                throws GuacamoleException
Given a GuacamoleProperty, parses and returns the value set for that property in guacamole.properties. An exception is thrown if the value is not provided.

Type Parameters:
Type - The type that the given property is parsed into.
Parameters:
property - The property to read from guacamole.properties.
Returns:
The parsed value of the property as read from guacamole.properties.
Throws:
GuacamoleException - If an error occurs while parsing the value for the given property in guacamole.properties, or if the property is not specified.


Copyright © 2013. All Rights Reserved.