*/
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.
*
*
* @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.
*
* @param process The valid (binded with a native process) java process to resume.
*
- * @exception NativeException if the SimGrid native code failed.
*
* @see Process.restart()
*/
- final static native void processResume(Process process) throws NativeException;
+ final static native void processResume(Process process);
/**
* The natively implemented method to test if MSG process is suspended.
*
* @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.
*
* @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.
*
* @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.
* @param process The (valid) process to migrate.
* @param host A (valid) host where move the process.
*
- * @exception NativeException if the SimGrid native code failed.
*
* @see Process.migrate()
* @see Host.getByName()
*/
- final static native void processChangeHost(Process process, Host host) throws NativeException;
+ final static native void processChangeHost(Process process, Host host) ;
/**
* The natively implemented native to request the current process to sleep
*
* @param seconds The time the current process must sleep.
*
- * @exception NativeException if the SimGrid native code failed.
+ * @exception HostFailureException if the SimGrid native code failed.
*
* @see Process.waitFor()
*/
- final static native void processWaitFor(double seconds) throws NativeException;
+ final static native void processWaitFor(double seconds) throws HostFailureException;
/**
* The natively implemented native method to exit a process.
* @return The host having the specified name.
*
* @exception HostNotFoundException if there is no such host
- * NativeException if the SimGrid native code failed.
+ *
*
* @see Host.getByName()
*/
- final static native Host hostGetByName(String name) throws HostNotFoundException, NativeException;
+ final static native Host hostGetByName(String name) throws HostNotFoundException;
/**
* The natively implemented method to get the name of an MSG host.
*
* @return The source of the task.
*
- * @exception NativeException if the SimGrid native code failed.
*
* @see Task.getSource()
*/
- final static native Host taskGetSource(Task task) throws NativeException;
+ final static native Host taskGetSource(Task task);
/**
* The natively implemented method to get the name of the task.
*
* @param task The task to cancel.
*
- * @exception NativeException if the cancellation failed.
*
* @see Task.cancel().
*/
- final static native void taskCancel(Task task) throws NativeException;
+ final static native void taskCancel(Task task);
/**
* The natively implemented method to create a MSG parallel task.
*
* @param The task to destroy.
*
- * @exception NativeException on error in the C world
*
* @see Task.destroy()
*/
- final static native void taskDestroy(Task task) throws NativeException;
+ final static native void taskDestroy(Task task) ;
/**
* The natively implemented method to execute a MSG task.
*
* @param task The task to execute.
*
- * @exception NativeException on error in the C world
+ * @exception HostFailureException,TaskCancelledException on error in the C world
*
* @see Task.execute()
*/
- final static native void taskExecute(Task task) throws NativeException;
-
-
+ final static native void taskExecute(Task task) throws HostFailureException,TaskCancelledException;
/* ****************************************************************
* Communication methods thru mailboxes *
**************************************************************** */
-
- final static native void taskSend(String alias, Task task, double timeout) throws NativeException;
- 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 void taskSend(String alias, Task task, double timeout) throws TransferFailureException,HostFailureException,TimeoutException;
+ final static native Task taskReceive(String alias, double timeout, Host host) throws TransferFailureException,HostFailureException,TimeoutException;
+ final static native int taskListenFrom(String alias);
final static native boolean taskListen(String alias);
final static native int taskListenFromHost(String alias, Host host);
*
* @exception NativeException on error in the C world
*/
- final static native void taskSendBounded(String alias, Task task, double maxrate) throws NativeException;
+ final static native void taskSendBounded(String alias, Task task, double maxrate) throws TransferFailureException,HostFailureException,TimeoutException;
-}
+}
\ No newline at end of file