net.sf.j2ep
Class ConfigParser

java.lang.Object
  extended by net.sf.j2ep.ConfigParser

public class ConfigParser
extends java.lang.Object

The config parser uses Digester to parse the config file. A rule chain with links to the servers will be constructed. Based on the work by Yoav Shapira for the balancer webapp distributed with Tomcat.

Author:
Anders Nyman, Yoav Shapira

Constructor Summary
ConfigParser(java.io.File data)
          Standard constructor only specifying the input file.
 
Method Summary
 ServerChain getServerChain()
          Returns the parsed server chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigParser

public ConfigParser(java.io.File data)
Standard constructor only specifying the input file. The constructor will parse the config and build a corresponding rule chain with the server mappings included.

Parameters:
data - The config file containing the XML data structure.
Method Detail

getServerChain

public ServerChain getServerChain()
Returns the parsed server chain.

Returns:
The resulting ServerChain