org.globus.cog.abstraction.impl.common
Class AbstractionFactory

java.lang.Object
  extended byorg.globus.cog.abstraction.impl.common.AbstractionFactory

public class AbstractionFactory
extends Object

This class implements the FACTORY pattern facilitating the creation of TaskHandlers and SecurityContexts for the required providers.


Constructor Summary
AbstractionFactory()
           
 
Method Summary
static void executeRunnable(String provider, String className)
           
protected static ClassLoader getLoader(String provider)
           
protected static ClassLoader getLoader(String provider, boolean doBoot)
           
static boolean hasObject(String provider, String role)
           
static TaskHandler newExecutionTaskHandler()
           
static TaskHandler newExecutionTaskHandler(String provider)
           
static TaskHandler newFileOperationTaskHandler()
           
static TaskHandler newFileOperationTaskHandler(String provider)
           
static FileResource newFileResource(String provider)
           
static TaskHandler newFileTransferTaskHandler()
           
static TaskHandler newFileTransferTaskHandler(String provider)
           
protected static Object newInstance(String provider, String className, boolean useSandbox)
           
static Object newObject(String provider, String role)
           
static SecurityContext newSecurityContext(String provider)
           
static TaskHandler newTaskHandler(String provider)
          Deprecated. Use the newExecutionTaskHandler(), newFileTransferTaskHandler(), or newFileOperationTaskHandler() instead
static TaskHandler newTaskHandler(String provider, String type)
           
static void runApplication(String provider, String className, String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractionFactory

public AbstractionFactory()
Method Detail

newExecutionTaskHandler

public static TaskHandler newExecutionTaskHandler()
                                           throws InvalidProviderException,
                                                  ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newExecutionTaskHandler

public static TaskHandler newExecutionTaskHandler(String provider)
                                           throws InvalidProviderException,
                                                  ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newFileTransferTaskHandler

public static TaskHandler newFileTransferTaskHandler()
                                              throws InvalidProviderException,
                                                     ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newFileTransferTaskHandler

public static TaskHandler newFileTransferTaskHandler(String provider)
                                              throws InvalidProviderException,
                                                     ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newFileOperationTaskHandler

public static TaskHandler newFileOperationTaskHandler()
                                               throws InvalidProviderException,
                                                      ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newFileOperationTaskHandler

public static TaskHandler newFileOperationTaskHandler(String provider)
                                               throws InvalidProviderException,
                                                      ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newTaskHandler

public static TaskHandler newTaskHandler(String provider,
                                         String type)
                                  throws InvalidProviderException,
                                         ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newTaskHandler

public static TaskHandler newTaskHandler(String provider)
                                  throws InvalidProviderException,
                                         ProviderMethodException
Deprecated. Use the newExecutionTaskHandler(), newFileTransferTaskHandler(), or newFileOperationTaskHandler() instead

Throws:
InvalidProviderException
ProviderMethodException

newFileResource

public static FileResource newFileResource(String provider)
                                    throws InvalidProviderException,
                                           ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newSecurityContext

public static SecurityContext newSecurityContext(String provider)
                                          throws InvalidProviderException,
                                                 ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

hasObject

public static boolean hasObject(String provider,
                                String role)

newObject

public static Object newObject(String provider,
                               String role)
                        throws InvalidProviderException,
                               ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

newInstance

protected static Object newInstance(String provider,
                                    String className,
                                    boolean useSandbox)
                             throws InvalidProviderException,
                                    InvalidClassException
Throws:
InvalidProviderException
InvalidClassException

getLoader

protected static ClassLoader getLoader(String provider)
                                throws InvalidProviderException
Throws:
InvalidProviderException

getLoader

protected static ClassLoader getLoader(String provider,
                                       boolean doBoot)
                                throws InvalidProviderException
Throws:
InvalidProviderException

executeRunnable

public static void executeRunnable(String provider,
                                   String className)
                            throws InvalidProviderException,
                                   ProviderMethodException
Throws:
InvalidProviderException
ProviderMethodException

runApplication

public static void runApplication(String provider,
                                  String className,
                                  String[] args)
                           throws NoSuchMethodException,
                                  NoSuchMethodException,
                                  ClassNotFoundException,
                                  InvalidProviderException,
                                  IllegalArgumentException,
                                  IllegalAccessException,
                                  InvocationTargetException
Throws:
NoSuchMethodException
ClassNotFoundException
InvalidProviderException
IllegalArgumentException
IllegalAccessException
InvocationTargetException