kom.tools.web
Class HTTPConfig

java.lang.Object
  |
  +--kom.tools.config.Config
        |
        +--kom.tools.web.HTTPConfig
Direct Known Subclasses:
NewsConfig, ServerConfig

public class HTTPConfig
extends Config

HTTP configuration


Field Summary
 java.lang.String admin
           
 java.util.Vector allowHosts
           
static java.lang.String debugLogFile
           
static java.io.PrintWriter debugWriter
           
 int defaultThreads
           
 java.util.Vector denyHosts
           
 java.lang.String errorFile
           
 java.lang.String fSeparator
           
 java.lang.String host
           
 java.lang.String KOMroot
           
 int maxThreads
           
 int minThreads
           
 int numThreads
           
 int port
           
 java.util.Vector preload
           
 int timeOut
           
 java.lang.String uploadDir
           
 
Fields inherited from class kom.tools.config.Config
currentParameter, currentSection, errorCode, errorLine, FILE_OPEN_ERROR, fileName, NO_ERROR, sections, SYNTAX_ERROR
 
Constructor Summary
HTTPConfig(java.lang.String fileName)
          Constructor
 
Method Summary
static void debugLog(java.lang.String s)
          Writes to a debug log defined by the configuration
static void errorLog(java.lang.String s)
          Writes to a log defined by the configuration
protected  void errorMsg(java.lang.String section, java.lang.String msg)
           
 boolean read()
          Reads and parses the configuration file
private  void settings()
          Gets the settings
 
Methods inherited from class kom.tools.config.Config
getPara, getPara, getPara, getPara, getSections, getValue, getValues, handleLine, main, section
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

allowHosts

public java.util.Vector allowHosts

denyHosts

public java.util.Vector denyHosts

errorFile

public java.lang.String errorFile

port

public int port

timeOut

public int timeOut

uploadDir

public java.lang.String uploadDir

preload

public java.util.Vector preload

host

public java.lang.String host

KOMroot

public java.lang.String KOMroot

defaultThreads

public int defaultThreads

numThreads

public int numThreads

minThreads

public int minThreads

maxThreads

public int maxThreads

admin

public java.lang.String admin

fSeparator

public java.lang.String fSeparator

debugLogFile

public static java.lang.String debugLogFile

debugWriter

public static java.io.PrintWriter debugWriter
Constructor Detail

HTTPConfig

public HTTPConfig(java.lang.String fileName)
Constructor
Parameters:
fileName - File path to configuration file
Method Detail

errorMsg

protected void errorMsg(java.lang.String section,
                        java.lang.String msg)

settings

private void settings()
Gets the settings

read

public boolean read()
Reads and parses the configuration file
Overrides:
read in class Config
Returns:
true on success

debugLog

public static void debugLog(java.lang.String s)
Writes to a debug log defined by the configuration
Parameters:
s - String to write, followed by eol

errorLog

public static void errorLog(java.lang.String s)
Writes to a log defined by the configuration
Parameters:
s - String to write, followed by eol