Skip navigation links

Package org.transitime.config

The classes used as part of specifying the configuration parameters for an application.

See: Description

Package org.transitime.config Description

The classes used as part of specifying the configuration parameters for an application. These parameters can be set either through command line options or through a configuration file. Default values are specified when each parameter is declared.

Parameters are declared in a Java class as static members. An example is:

 
 	public static String getProjectId() {
    return projectId.getValue();
  }
  private static StringConfigValue projectId = 
    new StringConfigValue("transitime.core.projectId", "sfmta");
 
 
Such a parameter can be set either using a command line java property when the application is invoked, such as: -Dtransitime.core.projectId=mbta

Or in a configuration file:

 
 <?xml version="1.0"?>
 <transitime>
   <core>
     <projectId>
       sfmta
     </projectId>
     <defaultBreakTimeSec>
       120
     </defaultBreakTimeSec>
   </core>
 </transitime>
 
 
Most parameters should be declared in org.transitimie.configData package.

Currently the configuration information is only read in at application startup. In the future would like to make this dynamic.

Author:
SkiBu Smith
Skip navigation links