Class ServiceConfigFactory

  • All Implemented Interfaces:
    ServiceConfigFactory

    public final class ServiceConfigFactory
    extends java.lang.Object
    implements ServiceConfigFactory

    This class is designed to be the main interface between the service configuration information and the users of the information. When initialized the factory loads the configuration from the file system, allowing access to the information by others.

    Author:
    Weave
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Service[] getServices()
      Returns an array of all the defined configuration information for the Services.
      void reload()
      Reload the config from the default config file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServiceConfigFactory

        public ServiceConfigFactory()
        Private constructor. This constructor used to load the specified configuration file and initialized an instance of the class.
        Parameters:
        configFile - The name of the configuration file.
        Throws:
        java.io.IOException - Thrown if the specified config file cannot be read
    • Method Detail

      • reload

        public void reload()
        Reload the config from the default config file
        Specified by:
        reload in interface ServiceConfigFactory
        Throws:
        java.io.IOException - Thrown if the specified config file cannot be read/loaded
        java.io.IOException - if any.
      • getServices

        public Service[] getServices()
        Returns an array of all the defined configuration information for the Services. If there are no defined services an array of length zero is returned to the caller.
        Specified by:
        getServices in interface ServiceConfigFactory
        Returns:
        An array holding a reference to all the Service configuration instances.