Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into fix/execute_benched
[simgrid.git] / src / bindings / java / org / simgrid / msg / Process.java
index 4e9247b..e4c7900 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2006-2014. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2006-2017. The SimGrid Team. All rights 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. */
@@ -51,11 +50,8 @@ public abstract class Process implements Runnable {
 
        /** Time at which the process should be created  */
        protected double startTime = 0;
-       /** Time at which the process should be killed.
-        * 
-        * Set at creation, and used internally by SimGrid
-        */
-       private double killTime = -1;
+       /** Time at which the process should be killed */
+       private double killTime = -1; // Used from the C world
 
        private String name = null;
        
@@ -116,9 +112,9 @@ public abstract class Process implements Runnable {
        public Process(Host host, String name, String[]args) 
        {
                if (host == null)
-                       throw new NullPointerException("Cannot create a process on the null host");
+                       throw new IllegalArgumentException("Cannot create a process on the null host");
                if (name == null)
-                       throw new NullPointerException("Process name cannot be null");
+                       throw new IllegalArgumentException("Process name cannot be null");
                
                this.host = host;
                this.name = name;
@@ -284,11 +280,10 @@ public abstract class Process implements Runnable {
        /**
         * This method actually creates and run the process.
         * It is a noop if the process is already launched.
-        * @throws HostNotFoundException
         */
-       public final void start() throws HostNotFoundException {
-               if (bind == 0)
-                        create(host);
+       public final void start() {
+          if (bind == 0)
+            create(host);
        }
 
        /** This method runs the process. It calls the method function that you must overwrite. */
@@ -316,7 +311,7 @@ public abstract class Process implements Runnable {
        }
 
        /**
-        * The main function of the process (to implement).
+        * The main function of the process (to implement by the user).
         *
         * @param args
         * @throws MsgException