appl.parallel.client
Class RemoteExecutionController

java.lang.Object
  extended by AbstractNamedObject
      extended by appl.parallel.client.RemoteExecutionController
All Implemented Interfaces:
XuluPlugin

public class RemoteExecutionController
extends AbstractNamedObject
implements XuluPlugin

This plugin is responsible that all services required for remote execution are properly started. It first starts the GlobalDiscoveryService. Then it uses the following entries of XuluConfig for configuration:

RemoteExecutionController.spmd.start - if, true the ClientDataServer is started.

RemoteExecutionController.http.start - if, true the HTTP-Class server is started.

RemoteExecutionController.startLocalXuluServer - if, true a local XuluServer is started.
.

Author:
Dominik Appl

Constructor Summary
RemoteExecutionController()
           
 
Method Summary
 void addResourceChangeListener(ResourceChangeListener r)
          adds the change lister
 void execute(XuluModellingPlatform appl)
          Starts the Plugin
 RemoteEventHandler getEventProxy()
           
 SPMDClientController getNewSPMDClientController(ComputingResourceContainer[] computingResources)
          Gives a new SPMDClientController.
 SPMDClientController getNewSPMDClientController(Vector<ComputingResourceContainer> computingResources)
          Gives a new SPMDClientController.
static RemoteExecutionController getRemoteExecutionController(XuluModellingPlatform modellingPlatform)
           
 boolean isStarted()
          Prueft, ob das Plugin gestartet ist.
 boolean isVisible()
          Prueft, ob die GUI zur Plugin-Konfiguration angezeigt wird.
 void prepareModelForSPMDExecution(ParallelStepModel model, ComputingResourceContainer[] selectedResourceContainers)
          Prepares a Model for execution, which means it creates a SPMDClientController with the given Resources
 void refreshResources()
          Gets active Resources and triggers the discovery-process.
 void removeResourceChangeListener(ResourceChangeListener r)
          Removes the change listener
 void setVisible(boolean visible)
          Zeigt die GUI zur Plugin-Konfiguration an oder verbirgt sie.
 void stop()
          Stoppt die Ausfuehrung des Plugins.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteExecutionController

public RemoteExecutionController()
Method Detail

execute

public void execute(XuluModellingPlatform appl)
Starts the Plugin

Specified by:
execute in interface XuluPlugin
Parameters:
appl - Instanz der Xulu-Applikation
See Also:
XuluPlugin.execute(edu.bonn.xulu.XuluModellingPlatform)

isStarted

public boolean isStarted()
Description copied from interface: XuluPlugin
Prueft, ob das Plugin gestartet ist.

Specified by:
isStarted in interface XuluPlugin

isVisible

public boolean isVisible()
Description copied from interface: XuluPlugin
Prueft, ob die GUI zur Plugin-Konfiguration angezeigt wird.

Specified by:
isVisible in interface XuluPlugin

setVisible

public void setVisible(boolean visible)
Description copied from interface: XuluPlugin
Zeigt die GUI zur Plugin-Konfiguration an oder verbirgt sie.

Specified by:
setVisible in interface XuluPlugin

stop

public void stop()
Description copied from interface: XuluPlugin
Stoppt die Ausfuehrung des Plugins.

Specified by:
stop in interface XuluPlugin

refreshResources

public void refreshResources()
Gets active Resources and triggers the discovery-process. After the resources are found an update is called on all registered ResourceChangeListeners. *


addResourceChangeListener

public void addResourceChangeListener(ResourceChangeListener r)
adds the change lister

Parameters:
r - the change listener

removeResourceChangeListener

public void removeResourceChangeListener(ResourceChangeListener r)
Removes the change listener

Parameters:
r - the change listener to remove

getNewSPMDClientController

public SPMDClientController getNewSPMDClientController(ComputingResourceContainer[] computingResources)
Gives a new SPMDClientController.

Parameters:
computingResources - the resources to be used by the new controller
Returns:
a new SPMDClientController for the given resources

getNewSPMDClientController

public SPMDClientController getNewSPMDClientController(Vector<ComputingResourceContainer> computingResources)
Gives a new SPMDClientController.

Parameters:
computingResources - the resources to be used by the new controller
Returns:
a new SPMDClientController for the given resources

getRemoteExecutionController

public static RemoteExecutionController getRemoteExecutionController(XuluModellingPlatform modellingPlatform)
Returns:
the execution controller of the given XuluModellingPlatform or null, if not found

getEventProxy

public RemoteEventHandler getEventProxy()

prepareModelForSPMDExecution

public void prepareModelForSPMDExecution(ParallelStepModel model,
                                         ComputingResourceContainer[] selectedResourceContainers)
Prepares a Model for execution, which means it creates a SPMDClientController with the given Resources

Parameters:
model - the model which is to be executed parallel
selectedResourceContainers - the resources on which the model is executed