org.locomotive.loco
Class HTTPServerConfig

java.lang.Object
  |
  +--org.locomotive.server.Config
        |
        +--org.locomotive.loco.HTTPServerConfig

public class HTTPServerConfig
extends Config

The config object for the HTTPServer. Each of the HTTPServer configs that can be set are listed and documented in the sample httptest.conf file included with each distribution. To see what the current config settings are, log into the Locomotive has an admin user and request the srv URL (i.e. 'http://www.yourdomain.com/cgi-bin/locolink/srv'). To change any configs during runtime, use the changeConfig() method. For more information, see the Locomotive Installation Guide or the Locomotive Administrator's Guide.


Fields inherited from class org.locomotive.server.Config
BEAN, forint, forstring
 
Constructor Summary
HTTPServerConfig(java.lang.String[] args, java.lang.String defaultpath)
          This creates an HTTPServerConfig object.
 
Method Summary
 java.lang.String changeConfig(java.lang.String name, java.lang.String value)
          changes the value of a config at runtime.
 void setupDefaults()
          This establishes the default setting for all the Locomotive configs.
 
Methods inherited from class org.locomotive.server.Config
addConfig, doConfigDump, genericGetInteger, genericGetString, genericSet, genericSetInteger, genericSetString, getConfigFilePath, getConfigNamesEnumeration, getInt, getString, init, isComment, loadConfigsFromFile, printsyntax
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPServerConfig

public HTTPServerConfig(java.lang.String[] args,
                        java.lang.String defaultpath)
                 throws java.lang.IllegalArgumentException
This creates an HTTPServerConfig object. It takes the same comman arguments as its super class.
Method Detail

setupDefaults

public void setupDefaults()
This establishes the default setting for all the Locomotive configs.
Overrides:
setupDefaults in class Config
Tags copied from class: Config
See Also:
Config.addConfig(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

changeConfig

public java.lang.String changeConfig(java.lang.String name,
                                     java.lang.String value)
                              throws ConfigNotFoundException,
                                     ConfigInitializationException
changes the value of a config at runtime. Checks for change in DB_TYPE, and, if changed, resets the DB_TYPE variable. Also checks to make sure SERVICE_DEFAULT is either HANDLER or SERVLET.
Overrides:
changeConfig in class Config
Parameters:
name: - the name of the config
value - the new value for the config.
Throws:
ConfigNotFoundException - if the config does not exist.
ConfigInitializationException - if the config value does not match the required constraints. For DB_TYPE, value must be either 'Oracle', 'Informix', 'Cloudscape', MySQL, or 'Solid'. For SERVICE_DEFAULT, this must be either 'Handler' or 'Servlet'.