/*
- * 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 {
/**
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++)
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();
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();
- }
+ }
}
}