edu.isi.pegasus.planner.transfer.refiner
Class RefinerFactory

java.lang.Object
  extended by edu.isi.pegasus.planner.transfer.refiner.RefinerFactory

public class RefinerFactory
extends Object

The factory class that loads an appropriate Transfer Refiner class, as specified by the properties.

Version:
$Revision: 2572 $
Author:
Karan Vahi

Field Summary
static String DEFAULT_PACKAGE_NAME
          The default package where the implementations reside, which this factory loads.
static String DEFAULT_REFINER_IMPLEMENTATION
          The default refiner implementation that is picked up.
 
Constructor Summary
RefinerFactory()
           
 
Method Summary
static Refiner loadInstance(ADag dag, PegasusBag bag)
          Loads the implementing class corresponding to the value specified in the properties.
static Refiner loadInstance(String className, PegasusBag bag, ADag dag)
          Loads the implementing class corresponding to the class.
 
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 implementations reside, which this factory loads.

See Also:
Constant Field Values

DEFAULT_REFINER_IMPLEMENTATION

public static final String DEFAULT_REFINER_IMPLEMENTATION
The default refiner implementation that is picked up.

See Also:
Constant Field Values
Constructor Detail

RefinerFactory

public RefinerFactory()
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(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 objects
dag - 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


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