Class RefinerFactory
- java.lang.Object
-
- edu.isi.pegasus.planner.transfer.refiner.RefinerFactory
-
public class RefinerFactory extends java.lang.Object
The factory class that loads an appropriate Transfer Refiner class, as specified by the properties.- 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 implementations reside, which this factory loads.static java.lang.String
DEFAULT_REFINER_IMPLEMENTATION
The default refiner implementation that is picked up.
-
Constructor Summary
Constructors Constructor Description RefinerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Refiner
loadInstance(ADag dag, PegasusBag bag)
Loads the implementing class corresponding to the value specified in the properties.static Refiner
loadInstance(java.lang.String className, PegasusBag bag, ADag dag)
Loads the implementing class corresponding to the class.
-
-
-
Field Detail
-
DEFAULT_PACKAGE_NAME
public static final java.lang.String DEFAULT_PACKAGE_NAME
The default package where the implementations reside, which this factory loads.- See Also:
- Constant Field Values
-
DEFAULT_REFINER_IMPLEMENTATION
public static final java.lang.String DEFAULT_REFINER_IMPLEMENTATION
The default refiner implementation that is picked up.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadInstance
public static Refiner loadInstance(ADag dag, PegasusBag bag) throws TransferRefinerFactoryException
Loads the implementing class corresponding to the value specified in the properties. If the package name is not specified with the class, then class is assumed to be in the DEFAULT_PACKAGE. The properties object passed should not be null.In addition it ends up loading the appropriate Transfer Implementation that is required by the refiner.
- Parameters:
dag
- the workflow that is being refined.bag
- the bag of initialization objects- Returns:
- the instance of the class implementing this interface.
- Throws:
TransferRefinerException
- that nests any error that might occur during the instantiation.TransferRefinerFactoryException
- See Also:
DEFAULT_PACKAGE_NAME
-
loadInstance
public static Refiner loadInstance(java.lang.String className, PegasusBag bag, ADag dag) throws TransferRefinerFactoryException
Loads the implementing class corresponding to the class. If the package name is not specified with the class, then class is assumed to be in the DEFAULT_PACKAGE. The properties object passed should not be null. In addition it ends up loading the appropriate Transfer Implementation that is required by the refiner.- Parameters:
className
- the name of the class that implements the mode.It can or cannot be with the package name.bag
- the bag of initialization objectsdag
- the workflow that is being refined.- Returns:
- the instance of the class implementing this interface.
- Throws:
TransferRefinerFactoryException
- that nests any error that might occur during the instantiation.- See Also:
DEFAULT_PACKAGE_NAME
-
-