com.ls.lars.communication
Class ConfigLoader

java.lang.Object
  |
  +--com.ls.util.xml.XMLConfigLoader
        |
        +--com.ls.lars.communication.ConfigLoader

public final class ConfigLoader
extends XMLConfigLoader

This class loads a config file into a map.

Version:
$Revision: 1.6 $
Author:
Last modified by $Author: MFehrenbach $

Fields inherited from class com.ls.util.xml.XMLConfigLoader
ARCHIVE_STRING, FILE_STRING, IP_ADDRESS_STRING, logger, NAME_STRING, PATH_STRING, PORT_STRING, PROTOCOL_STRING
 
Constructor Summary
ConfigLoader()
          the default constructor
ConfigLoader(String protocol)
          constructor
ConfigLoader(String protocol, IXMLHandler iXMLHandler)
          constructor
 
Method Summary
 List getMessageList(Map config, String receiverName)
          Converts the config file map into a list of messages.
 
Methods inherited from class com.ls.util.xml.XMLConfigLoader
getGlobalConfigPath, parseFile, parseFile, parseFile, setGlobalConfigPath, setGlobalConfigPath, setLog, setProtocol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigLoader

public ConfigLoader()
the default constructor

ConfigLoader

public ConfigLoader(String protocol)
constructor
Parameters:
protocol - specifies the protocol for witch this loader will be created

ConfigLoader

public ConfigLoader(String protocol,
                    IXMLHandler iXMLHandler)
constructor
Parameters:
protocol - specifies the protocol for witch this loader will be created
iXMLHandler - the handler used by the loader
Method Detail

getMessageList

public List getMessageList(Map config,
                           String receiverName)
Converts the config file map into a list of messages.
Parameters:
config - the configHash from parseFile(configFileNames).
receiverName - the name of the receiving agent of all those messages
Returns:
List of messages. If the configHash is null, the message list will be emtpy.