Class ConfigLoader

java.lang.Object
org.drip.param.config.ConfigLoader

public class ConfigLoader
extends java.lang.Object
ConfigLoader implements the configuration functionality. It exposes the following:

  • Parses the XML configuration file and extract the tag pairs information.
  • Retrieve the logger.
  • Load the holiday calendars and retrieve the location holidays.
  • Connect to analytics server and the database server.


Depending on the configuration setting, ConfigLoader loads the above from either a file or the specified database.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    ConfigLoader()  
  • Method Summary

    Modifier and Type Method Description
    static java.net.Socket ConnectToAnalServer​(java.lang.String strConfigFile)
    Connect to the analytics server from the connection parameters set in the XML Configuration file
    static java.net.ServerSocket InitAnalServer​(java.lang.String strConfigFile)
    Initialize the analytics server from the connection parameters set in the XML Configuration file
    static CaseInsensitiveTreeMap<Locale> LoadHolidayCalendars​(java.lang.String strConfigFile)
    Load the map of the holiday calendars from the entries set in the XML Configuration file
    static CaseInsensitiveTreeMap<Locale> LoadHolidayCalendarsFromDB​(java.lang.String strConfigFile)
    Load the map of the holiday calendars from the database settings set in the XML Configuration file
    static Locale LocationHolidays​(org.w3c.dom.Document doc, java.lang.String strLoc)
    Create a LocHolidays object from the XML Document and the Location Tag
    static java.lang.String LoggerLocation​(java.lang.String strConfigFile)
    Get the logger location from the XML Configuration file
    static java.sql.Statement OracleInit​(java.lang.String strConfigFile)
    Initialize the Oracle database from the connection parameters set in the XML Configuration file

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigLoader

      public ConfigLoader()
  • Method Details

    • LocationHolidays

      public static Locale LocationHolidays​(org.w3c.dom.Document doc, java.lang.String strLoc)
      Create a LocHolidays object from the XML Document and the Location Tag
      Parameters:
      doc - XML Document
      strLoc - Location Tag
      Returns:
      LocHolidays
    • LoggerLocation

      public static java.lang.String LoggerLocation​(java.lang.String strConfigFile)
      Get the logger location from the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      String representing the logger location's full path
    • ConnectToAnalServer

      public static java.net.Socket ConnectToAnalServer​(java.lang.String strConfigFile)
      Connect to the analytics server from the connection parameters set in the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      java.net.Socket
    • InitAnalServer

      public static java.net.ServerSocket InitAnalServer​(java.lang.String strConfigFile)
      Initialize the analytics server from the connection parameters set in the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      java.net.ServerSocket
    • LoadHolidayCalendars

      public static CaseInsensitiveTreeMap<Locale> LoadHolidayCalendars​(java.lang.String strConfigFile)
      Load the map of the holiday calendars from the entries set in the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      Map of the holiday calendars
    • OracleInit

      public static java.sql.Statement OracleInit​(java.lang.String strConfigFile)
      Initialize the Oracle database from the connection parameters set in the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      Connection Statement object
    • LoadHolidayCalendarsFromDB

      public static final CaseInsensitiveTreeMap<Locale> LoadHolidayCalendarsFromDB​(java.lang.String strConfigFile)
      Load the map of the holiday calendars from the database settings set in the XML Configuration file
      Parameters:
      strConfigFile - XML Configuration file
      Returns:
      Map of the holiday calendars