Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename simgrid::exception into simgrid::Exception
[simgrid.git] / src / bindings / java / jmsg_process.cpp
index a25eb46..f914fc8 100644 (file)
@@ -5,14 +5,13 @@
 /* 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. */
 
-#include <xbt/ex.hpp>
-
 #include "jmsg_process.h"
 
 #include "JavaContext.hpp"
 #include "jmsg.hpp"
 #include "jmsg_host.h"
 #include "jxbt_utilities.hpp"
+#include "simgrid/Exception.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
 
@@ -25,7 +24,8 @@ jfieldID jprocess_field_Process_ppid;
 
 jobject jprocess_from_native(msg_process_t process)
 {
-  simgrid::kernel::context::JavaContext* context = (simgrid::kernel::context::JavaContext*) process->getImpl()->context;
+  simgrid::kernel::context::JavaContext* context =
+      (simgrid::kernel::context::JavaContext*)process->get_impl()->context_;
   return context->jprocess;
 }
 
@@ -101,9 +101,9 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_daemonize(JNIEnv* env, jobje
   process->daemonize();
 }
 
-JNIEXPORT jint JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv* env, jclass cls)
+JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_killAll(JNIEnv* env, jclass cls)
 {
-  return (jint)MSG_process_killall();
+  MSG_process_killall();
 }
 
 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Process_fromPID(JNIEnv * env, jclass cls, jint pid)
@@ -195,7 +195,7 @@ JNICALL Java_org_simgrid_msg_Process_setAutoRestart (JNIEnv *env, jobject jproce
     return;
   }
 
-  process->setAutoRestart(jauto_restart == JNI_TRUE);
+  process->set_auto_restart(jauto_restart == JNI_TRUE);
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_restart (JNIEnv *env, jobject jprocess) {
@@ -219,7 +219,7 @@ JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Process_isSuspended(JNIEnv * env
   }
 
   /* true is the process is suspended, false otherwise */
-  return (jboolean)process->isSuspended();
+  return (jboolean)process->is_suspended();
 }
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos)