1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.codegen.simucontroller.runconfig; |
5 | |
6 | import org.apache.log4j.Logger; |
7 | import org.eclipse.core.runtime.CoreException; |
8 | |
9 | import de.uka.ipd.sdq.codegen.simucontroller.debug.IDebugListener; |
10 | import de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs.SensitivityAnalysisJob; |
11 | import de.uka.ipd.sdq.workflow.IJob; |
12 | import de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration; |
13 | import de.uka.ipd.sdq.workflow.pcm.jobs.PCMWorkflowJobBuilder; |
14 | |
15 | /**Builder for SimuComJobs. |
16 | * @author groenda |
17 | */ |
18 | public class SimuComWorkflowJobBuilder extends PCMWorkflowJobBuilder { |
19 | /** Logger for this class. */ |
20 | private static final Logger logger = Logger.getLogger(SimuComWorkflowJobBuilder.class); |
21 | |
22 | /** Debug listener for created SimuCom job. */ |
23 | private IDebugListener listener; |
24 | |
25 | public SimuComWorkflowJobBuilder(IDebugListener listener) { |
26 | this.listener = listener; |
27 | } |
28 | |
29 | /* (non-Javadoc) |
30 | * @see de.uka.ipd.sdq.workflow.pcm.jobs.PCMWorkflowJobBuilder#buildJob(de.uka.ipd.sdq.workflow.pcm.configurations.AbstractPCMWorkflowRunConfiguration) |
31 | */ |
32 | @Override |
33 | public IJob buildJob(AbstractPCMWorkflowRunConfiguration config) { |
34 | try { |
35 | return new SensitivityAnalysisJob((SimuComWorkflowConfiguration) config, listener); |
36 | } catch (CoreException e) { |
37 | logger.error("Core exception occured when building SensitivityAnalysisJob.", e); |
38 | return null; |
39 | } |
40 | } |
41 | |
42 | } |