* access to it. It is set automatically during the build of the object.
*/
private long bind;
- /**
- * Indicates if the process is started
- */
+ /** Indicates if the process is started */
boolean started;
/**
* Even if this attribute is public you must never access to it.
/** Time at which the process should be created */
protected double startTime = 0;
- /** Time at which th
- * Kill time of the process
+ /** Time at which the process should be killed.
*
* Set at creation, and used internally by SimGrid
*/
public Vector<String> args;
- /**
- * Default constructor
- */
+ /** Default constructor */
protected Process() {
this.id = nextProcessId++;
this.name = null;
public Process(Host host, String name, String[]args) {
this();
this.host = host;
+ if (host == null)
+ throw new NullPointerException("Process name cannot be NULL");
if (name == null)
throw new NullPointerException("Process name cannot be NULL");
this.name = name;
public Process(Host host, String name, String[]args, double startTime, double killTime) {
this();
this.host = host;
+ if (host == null)
+ throw new NullPointerException("Process name cannot be NULL");
if (name == null)
throw new NullPointerException("Process name cannot be NULL");
this.name = name;
public native void resume();
/** Tests if a process is suspended.
*
- * @see {@link #suspend()} and {@link #resume()}
- */
+ * @see #suspend()
+ * @see #resume()
+ */
public native boolean isSuspended();
/**
}
}
- /**
- * This method runs the process. Il calls the method function that you must overwrite.
- */
+ /** This method runs the process. Il calls the method function that you must overwrite. */
+ @Override
public void run() {
String[] args = null; /* do not fill it before the signal or this.args will be empty */
- //waitSignal(); /* wait for other people to fill the process in */
try {
args = new String[this.args.size()];
*/
public abstract void main(String[]args) throws MsgException;
- public native void exit();
+ public native void exit();
/**
* Class initializer, to initialize various JNI stuff
*/
private static native void nativeInit();
static {
- Msg.nativeInit();
+ org.simgrid.NativeLib.nativeInit();
nativeInit();
}
/**