*/
private long bind = 0;
/** Indicates if the process is started */
- boolean started;
/**
* Even if this attribute is public you must never access to it.
* It is used to compute the id of an MSG process.
this.killTime = killTime;
}
/**
- * The natively implemented method to create an MSG process.
- * @param hostName A valid (bound) host where create the process.
+ * The native method to create an MSG process.
+ * @param host where to create the process.
*/
- protected native void create(String hostName) throws HostNotFoundException;
+ protected native void create(Host host);
+
/**
* This method kills all running process of the simulation.
*
* @throws HostNotFoundException
*/
public final void start() throws HostNotFoundException {
- if (!started) {
- started = true;
- create(host.getName());
- }
+ if (bind == 0)
+ create(host);
}
- /** This method runs the process. Il calls the method function that you must overwrite. */
+ /** This method runs the process. It calls the method function that you must overwrite. */
@Override
public void run() {