edu.isi.pegasus.planner.selector.site
Class SiteSelectorFactory

java.lang.Object
  extended by edu.isi.pegasus.planner.selector.site.SiteSelectorFactory

public class SiteSelectorFactory
extends 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: 2572 $
Author:
Karan Vahi

Field Summary
static String DEFAULT_PACKAGE_NAME
          The default package where the all the implementing classes provided with the VDS reside.
static String DEFAULT_SITE_SELECTOR
          The name of the class in the DEFAULT package, that corresponds to the default site selector.
 
Constructor Summary
SiteSelectorFactory()
           
 
Method Summary
static SiteSelector loadInstance(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 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 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(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


Copyright © 2011 The University of Southern California. All Rights Reserved.