X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/95250056fde87d7c6413baa5cc3724fd8f9a83f9..6068c9f0036786cdcbeb273d495e5aa378cb5f92:/src/jmsg_process.h diff --git a/src/jmsg_process.h b/src/jmsg_process.h index 0f5c41b0ca..a97c0ddd40 100644 --- a/src/jmsg_process.h +++ b/src/jmsg_process.h @@ -13,6 +13,16 @@ #include #include +//Cached java fields +jfieldID jprocess_field_Process_bind; +jfieldID jprocess_field_Process_host; +jfieldID jprocess_field_Process_killTime; +jfieldID jprocess_field_Process_id; +jfieldID jprocess_field_Process_name; +jfieldID jprocess_field_Process_pid; +jfieldID jprocess_field_Process_ppid; + + jobject native_to_java_process(m_process_t process); /** @@ -53,33 +63,6 @@ void jprocess_delete_global_ref(jobject jprocess, JNIEnv * env); * */ void jprocess_join(jobject jprocess, JNIEnv * env); - -/** - * This function starts the specified java process. - * - * @param jprocess The java process to start. - * @param env The env of the current thread - * - * @exception If the class Process is not found the function throws - * the ClassNotFoundException. If the methos start() of - * this class is not found the function throws the exception - * NotSuchMethodException. - */ -void jprocess_start(jobject jprocess, JNIEnv * env); - -/** - * This function forces the java process to stop. - * - * @param jprocess The java process to stop. - * @param env The env of the current thread - * - * @exception If the class Process is not found the function throws - * the ClassNotFoundException. If the methos stop() of - * this class is not found the function throws the exception - * NotSuchMethodException. - */ -void jprocess_exit(jobject jprocess, JNIEnv * env); - /** * This function associated a native process to a java process instance. * @@ -168,7 +151,8 @@ Java_org_simgrid_msg_Process_nativeInit(JNIEnv *env, jclass cls); */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_create(JNIEnv * env, - jobject jprocess, jobject jhost); + jobject jprocess_arg, + jobject jhostname); /* * Class org_simgrid_msg_Process @@ -236,7 +220,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_waitFor * Signature (Lsimgrid/msg/Process;)V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_kill - (JNIEnv *, jclass, jobject); + (JNIEnv *, jobject); /* * Class org_simgrid_msg_Process