de.uka.ipd.sdq.codegen.runconfig
Class LaunchConfigurationDelegate<T extends AttributesGetMethods>

java.lang.Object
  extended by de.uka.ipd.sdq.codegen.runconfig.LaunchConfigurationDelegate<T>
Direct Known Subclasses:
SimuLaunchConfigurationDelegate

public abstract class LaunchConfigurationDelegate<T extends AttributesGetMethods>
extends Object

The class is defined by the delegate attribute of a launchConfigurationType extension and performs launching for a SimuBench launch configuration.The class is abstract and defines the following methods, which must be implemented by subclasses. createRunCompositeJob() - create the composite job, which had to be added to Workflow isShouldThrowException() - should exception if launching fails In order to be able to make the co-variant restriction for this class, was defined here directly a generic type parameter T. The parameter T must be AttributesGetMethods or a subclass at least. Thus one limits already the use range of this class from the beginning and avoids also unnecessary type casting.

Author:
Roman Andrej

Field Summary
protected  Log logger
           
 
Constructor Summary
LaunchConfigurationDelegate()
           
 
Method Summary
protected abstract  T createAttributesGetMethods(ILaunchConfiguration configuration)
          The method create the instance of generic type T.
protected abstract  IJob createRunCompositeJob(T attributes, boolean isDebug, ILaunch launch)
          create the composite job, which had to be added to Workflow
 void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Log logger
Constructor Detail

LaunchConfigurationDelegate

public LaunchConfigurationDelegate()
Method Detail

launch

public void launch(ILaunchConfiguration configuration,
                   String mode,
                   ILaunch launch,
                   IProgressMonitor monitor)
            throws CoreException
Throws:
CoreException

createRunCompositeJob

protected abstract IJob createRunCompositeJob(T attributes,
                                              boolean isDebug,
                                              ILaunch launch)
                                       throws JobFailedException,
                                              CoreException
create the composite job, which had to be added to Workflow

Parameters:
attributes - - the generic type must be AttributesGetMethods or a subclass at least.
isDebug - whether the Job created should be debugable
launch -
Throws:
JobFailedException
CoreException
See Also:
Workflow

createAttributesGetMethods

protected abstract T createAttributesGetMethods(ILaunchConfiguration configuration)
The method create the instance of generic type T. The type defines that access methods on ILaunchConfiguration-Object