Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further cleanups of the java bindings
[simgrid.git] / src / java / simgrid / msg / MsgNative.java
index 354afa2..c31ab49 100644 (file)
@@ -18,14 +18,12 @@ package simgrid.msg;
  */
 final class MsgNative {
 
-
        final static native
        void selectContextFactory(String name) throws NativeException;
 
        /******************************************************************
         * The natively implemented methods connected to the MSG Process  *
         ******************************************************************/
-
        /**
         * The natively implemented method to create an MSG process.
         *
@@ -53,11 +51,9 @@ final class MsgNative {
         *
         * @param process        The valid (binded with a native process) java process to suspend.
         *
-        * @exception            NativeException if the SimGrid native code failed.
-        *
         * @see                 Process.pause()
         */
-       final static native void processSuspend(Process process) throws NativeException;
+       final static native void processSuspend(Process process);
 
        /**
         * The natively implemented method to kill a MSG process.
@@ -98,11 +94,11 @@ final class MsgNative {
         *
         * @return                The method returns the host where the process is running.
         *
-        * @exception            NativeException if the SimGrid native code failed.
+        * @exception            HostNotFoundException if the SimGrid native code failed (initialization error?).
         *
         * @see                 Process.getHost()
         */
-       final static native Host processGetHost(Process process) throws NativeException;
+       final static native Host processGetHost(Process process);
 
        /**
         * The natively implemented method to get a MSG process from his PID.
@@ -124,11 +120,9 @@ final class MsgNative {
         *
         * @return                The PID of the specified process.
         *
-        * @exception            NativeException if the SimGrid native code failed.
-        *
         * @see                 Process.getPID()
         */
-       final static native int processGetPID(Process process) throws NativeException;
+       final static native int processGetPID(Process process);
 
        /**
         * The natively implemented method to get the PPID of a MSG process.
@@ -137,22 +131,18 @@ final class MsgNative {
         *
         * @return                The PPID of the specified process.
         *
-        * @exception            NativeException if the SimGrid native code failed.
-        *
         * @see                 Process.getPPID()
         */
-       final static native int processGetPPID(Process process) throws NativeException;
+       final static native int processGetPPID(Process process);
 
        /**
         * The natively implemented method to get the current running process.
         *
         * @return             The current process.
         *
-        * @exception            NativeException if the SimGrid native code failed.
-
         * @see                Process.currentProcess()
         */
-       final static native Process processSelf() throws NativeException;
+       final static native Process processSelf();
 
        /**
         * The natively implemented method to migrate a process from his currnet host to a new host.
@@ -419,14 +409,11 @@ final class MsgNative {
         */
        final static native void taskExecute(Task task) throws NativeException;
 
-
-
        /* ****************************************************************
         * Communication methods thru mailboxes                           *
         **************************************************************** */
 
-
-       final static native void taskSend(String alias, Task task, double timeout) throws NativeException;
+       final static native void taskSend(String alias, Task task, double timeout) throws NativeException,TransferFailureException,HostFailureException,TimeoutException;
        final static native Task taskReceive(String alias, double timeout, Host host) throws NativeException;
        final static native int taskListenFrom(String alias) throws NativeException;
        final static native boolean taskListen(String alias);
@@ -448,4 +435,4 @@ final class MsgNative {
         */ 
        final static native void taskSendBounded(String alias, Task task, double maxrate) throws NativeException;
 
-}
+}
\ No newline at end of file