org.powertac.common.interfaces
Interface ServerProperties


public interface ServerProperties

Supports server configuration by allowing components to retrieve property values from a standard Java properties file. The property values are searched from three locations; values in later locations override values in earlier locations.

  1. server.properties in the top level of the server jarfile. This contains standard settings for all the standard server components.
  2. A file named server.properties in the current directory.
  3. A file provided on the command-line as the value of the config option.

Author:
John Collins

Method Summary
 Double getDoubleProperty(String name, Double defaultValue)
          Returns the value of the named property as a Double, or defaultValue if no such property is found.
 Integer getIntegerProperty(String name, Integer defaultValue)
          Returns the value of the named property as an Integer, or defaultValue if no such property is found.
 String getProperty(String name)
          Returns the value of the property with the given name, or null if no such property is found.
 String getProperty(String name, String defaultValue)
          Returns the value of the named property, or the defaultValue if no such property is found.
 

Method Detail

getProperty

String getProperty(String name)
Returns the value of the property with the given name, or null if no such property is found.


getProperty

String getProperty(String name,
                   String defaultValue)
Returns the value of the named property, or the defaultValue if no such property is found.


getIntegerProperty

Integer getIntegerProperty(String name,
                           Integer defaultValue)
Returns the value of the named property as an Integer, or defaultValue if no such property is found.


getDoubleProperty

Double getDoubleProperty(String name,
                         Double defaultValue)
Returns the value of the named property as a Double, or defaultValue if no such property is found.



Copyright © 2012 Power TAC. All Rights Reserved.