Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Further cleanups of ruby, plus add FIXME in ruby and Java for the next cleanups
[simgrid.git] / src / java / simgrid / msg / ApplicationHandler.java
index 4ece14d5fbff9f499526d87e5ee90298ee8c1f4f..335cd46a348c78d11073070b9124a1ccac829d87 100644 (file)
@@ -1,36 +1,25 @@
 /*
- * simgrid.msg.ApplicationHandler.java 1.00 07/05/01
+ * These are the upcalls used by the FleXML parser for application files
  *
- * Copyright 2006,2007 Martin Quinson, Malek Cherier           
+ * Copyright 2006,2007,2010 The SimGrid team.           
  * All right reserved. 
  *
  * This program is free software; you can redistribute 
  * it and/or modify it under the terms of the license 
- *(GNU LGPL) which comes with this package. 
+ * (GNU LGPL) which comes with this package.
  */
 
 package simgrid.msg;
 
+/* FIXME: Kill the process factory: that's just a storage of informations, AppHandler can do the work itself */
+
 import java.util.Vector;
 import java.util.Hashtable;
 
-/**
- * The handler used to parse the deployment file which contains 
- * the description of the application (simulation).
- *
- * @author  Abdelmalek Cherier
- * @author  Martin Quinson
- * @version 1.00, 07/05/01
- * @see Host
- * @see Process
- * @see Simulation
- * @since SimGrid 3.3
- * @since JDK1.5011 
- */
 public final class ApplicationHandler {
 
        /* 
-        * This class is used to create the processes descibed in the deployment file.
+        * This class is used to create the processes described in the deployment file.
         */
        static class ProcessFactory {
                /**
@@ -113,7 +102,7 @@ public final class ApplicationHandler {
                                 Host host = Host.getByName(this.hostName);
 
                                 MsgNative.processCreate(process, host);
-                                Vector args = processFactory.args;
+                                Vector<String> args = processFactory.args;
                                 int size = args.size();
 
                                 for (int index = 0; index < size; index++)
@@ -122,10 +111,6 @@ public final class ApplicationHandler {
                                 process.properties = this.properties;
                                 this.properties = new Hashtable();
 
-                        } catch(JniException e) {
-                                System.out.println(e.toString());
-                                e.printStackTrace();
-
                         } catch(NativeException e) {
                                 System.out.println(e.toString());
                                 e.printStackTrace();
@@ -140,15 +125,12 @@ public final class ApplicationHandler {
                                 e.printStackTrace();
 
                         } catch(InstantiationException e) {
-                                System.out.println("instantiation exception");
+                                System.out.println("Unable to create the process. I got an instantiation exception");
                                 e.printStackTrace();
                         } catch(IllegalAccessException e) {
-                                System.out.println("illegal access exception");
-                                e.printStackTrace();
-                        } catch(IllegalArgumentException e) {
-                                System.out.println("illegal argument exception");
+                                System.out.println("Unable to create the process. I got an illegal access exception");
                                 e.printStackTrace();
-                        }
+                        } 
 
                 }
        }