- */
- public void registerProcessArg(String arg){
- this.args.add(arg);
- }
-
- public void createProcess(){
- try {
-
- Class cls = Class.forName(this.function);
- simgrid.msg.Process process = (simgrid.msg.Process)cls.newInstance();
- process.name = process.getName(); //this.function;
- process.id = simgrid.msg.Process.nextProcessId++;
- Host host = Host.getByName(this.hostName);
- Msg.processCreate(process,host);
- Vector args = processFactory.args;
- int size = args.size();
-
- for(int index = 0; index < size; index++)
- process.args.add(args.get(index));
-
- } catch(JniException e)
- {
- System.out.println(e.toString());
- e.printStackTrace();
-
- } catch(NativeException e)
- {
- System.out.println(e.toString());
- e.printStackTrace();
-
- } catch(HostNotFoundException e) {
- System.out.println(e.toString());
- e.printStackTrace();
-
- } catch(ClassNotFoundException e) {
- System.out.println(this.function + " class not found\n The attribut function of the element process of your deployment file\n must correspond to the name of a Msg Proces class)");
- e.printStackTrace();
-
- } catch(InstantiationException e) {
- System.out.println("instantiation exception");
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- System.out.println("illegal access exception");
- e.printStackTrace();
- } catch (IllegalArgumentException e) {
- System.out.println("illegal argument exception");
- e.printStackTrace();
- }
-
- }
- }
-
- /*
- * the ProcessFactory object used to create the processes.
- */
- private ProcessFactory processFactory;
-
- public ApplicationHandler() {
- super();
+ */ public void registerProcessArg(String arg) {
+ this.args.add(arg);
+ }
+
+ public void createProcess() {
+ try {
+
+ Class cls = Class.forName(this.function);
+
+ simgrid.msg.Process process = (simgrid.msg.Process) cls.newInstance();
+ process.name = process.getName(); //this.function;
+ process.id = simgrid.msg.Process.nextProcessId++;
+ Host host = Host.getByName(this.hostName);
+
+ Msg.processCreate(process, host);
+ Vector args = processFactory.args;
+ int size = args.size();
+
+ for (int index = 0; index < size; index++)
+ process.args.add(args.get(index));
+
+ } catch(JniException e) {
+ System.out.println(e.toString());
+ e.printStackTrace();
+
+ } catch(NativeException e) {
+ System.out.println(e.toString());
+ e.printStackTrace();
+
+ } catch(HostNotFoundException e) {
+ System.out.println(e.toString());
+ e.printStackTrace();
+
+ } catch(ClassNotFoundException e) {
+ System.out.println(this.function +
+ " class not found\n The attribut function of the element process of your deployment file\n must correspond to the name of a Msg Proces class)");
+ e.printStackTrace();
+
+ } catch(InstantiationException e) {
+ System.out.println("instantiation exception");
+ e.printStackTrace();
+ } catch(IllegalAccessException e) {
+ System.out.println("illegal access exception");
+ e.printStackTrace();
+ } catch(IllegalArgumentException e) {
+ System.out.println("illegal argument exception");
+ e.printStackTrace();
+ }
+