/[xulu]/trunk/src/appl/parallel/gui/ModelControlContainer_parallel.java
ViewVC logotype

Annotation of /trunk/src/appl/parallel/gui/ModelControlContainer_parallel.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 78 - (hide annotations)
Wed Feb 10 16:43:46 2010 UTC (14 years, 10 months ago) by alfonx
File size: 1765 byte(s)
Merged branch 1.8-gt2-2.6 to trunk. Now the trunk is based on GeoTools 2.6.1 and schmitzm-2.0.x
1 mojays 2 package appl.parallel.gui;
2    
3     import appl.parallel.client.RemoteExecutionController;
4     import appl.parallel.model.ParallelStepModel;
5     import edu.bonn.xulu.XuluModellingPlatform;
6     import edu.bonn.xulu.model.XuluModel;
7     import edu.bonn.xulu.plugin.gui.ModelControlContainer;
8    
9     /**
10     * This class extends the functionality of the container to support the execution
11     * of a {@link ParallelStepModel}. It retrieves the {@link RemoteExecutionController}
12     * and uses it to prepare the model for parallel execution.
13     *
14     * @author Dominik Appl
15     */
16     public class ModelControlContainer_parallel extends ModelControlContainer {
17    
18     private final XuluModellingPlatform appl;
19    
20     private final ParallelControlPanelEngine pcpEngine;
21    
22     /**
23     * A new instance
24     * @param model the XuluModel which should be executed
25     * @param pcpEngine the controlling engine for parallel execution
26     * @param appl the Xulu application
27     */
28     public ModelControlContainer_parallel(XuluModel model,
29     ParallelControlPanelEngine pcpEngine, XuluModellingPlatform appl) {
30     super(model);
31     this.pcpEngine = pcpEngine;
32     // TODO Auto-generated constructor stub
33     this.appl = appl;
34     }
35    
36     @Override
37     protected void createNewThread() {
38     if (model instanceof ParallelStepModel) {
39     // create the ClientController
40     RemoteExecutionController remoteController = RemoteExecutionController
41     .getRemoteExecutionController(appl);
42     if (remoteController == null)
43     throw new UnsupportedOperationException(
44     "You must load the RemoteExecutionController-Plugin to execute parallel Models!");
45     remoteController.prepareModelForSPMDExecution(
46     (ParallelStepModel) model, pcpEngine
47     .getSelectedResourceContainers());
48    
49     }
50     super.createNewThread();
51     }
52     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26