Class SiteSelectorFactory


  • public class SiteSelectorFactory
    extends java.lang.Object
    A factory class to load the appropriate type of Site Selector, as specified by the user at runtime in properties. Each invocation of the factory results in a SiteSelector being instantiated.
    Version:
    $Revision$
    Author:
    Karan Vahi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_PACKAGE_NAME
      The default package where the all the implementing classes provided with the VDS reside.
      static java.lang.String DEFAULT_SITE_SELECTOR
      The name of the class in the DEFAULT package, that corresponds to the default site selector.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SiteSelector loadInstance​(edu.isi.pegasus.planner.classes.PegasusBag bag)
      Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_PACKAGE_NAME

        public static final java.lang.String DEFAULT_PACKAGE_NAME
        The default package where the all the implementing classes provided with the VDS reside.
        See Also:
        Constant Field Values
      • DEFAULT_SITE_SELECTOR

        public static final java.lang.String DEFAULT_SITE_SELECTOR
        The name of the class in the DEFAULT package, that corresponds to the default site selector.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SiteSelectorFactory

        public SiteSelectorFactory()
    • Method Detail

      • loadInstance

        public static SiteSelector loadInstance​(edu.isi.pegasus.planner.classes.PegasusBag bag)
                                         throws SiteSelectorFactoryException
        Loads the implementing class corresponding to the mode specified by the user at runtime in the properties file. A default replica selector is loaded if property is not specified in the properties.
        Parameters:
        bag - the bag of objects that is required.
        Returns:
        the instance of the class implementing this interface.
        Throws:
        SiteSelectorFactoryException - that chains any error that might occur during the instantiation
        See Also:
        DEFAULT_PACKAGE_NAME, DEFAULT_SITE_SELECTOR