public class Forwarder extends simgrid.msg.Process {
- public void main(String[] args) throws NativeException {
+ public void main(String[] args) throws MsgException {
if (args.length < 3) {
Msg.info("Forwarder needs 3 arguments (input mailbox, first output mailbox, last one)");
Msg.info("Got "+args.length+" instead");
import simgrid.msg.*;
public class Master extends simgrid.msg.Process {
- public void main(String[] args) throws NativeException {
+ public void main(String[] args) throws MsgException {
if (args.length < 4) {
Msg.info("Master needs 4 arguments");
System.exit(1);
import simgrid.msg.*;
public class Master extends simgrid.msg.Process {
- public void main(String[] args) throws NativeException {
+ public void main(String[] args) throws MsgException {
if (args.length < 4) {
Msg.info("Master needs 4 arguments");
System.exit(1);
private final double commSizeLat = 1;
final double commSizeBw = 100000000;
- public void main(String[] args) throws NativeException {
+ public void main(String[] args) throws MsgException {
Msg.info("hello!");
/**
* The main function of the process (to implement).
*/
- public abstract void main(String[]args) throws NativeException;
+ public abstract void main(String[]args) throws MsgException;
public void unschedule() {
}
}
- /** Send the given task in the mailbox associated with the specified alias (waiting at most given time) */
- public void taskSend(String mailbox, Task task, double timeout) throws NativeException {
+ /** Send the given task in the mailbox associated with the specified alias (waiting at most given time)
+ * @throws TimeoutException
+ * @throws HostFailureException
+ * @throws TransferFailureException */
+ public void taskSend(String mailbox, Task task, double timeout) throws NativeException, TransferFailureException, HostFailureException, TimeoutException {
MsgNative.taskSend(mailbox, task, timeout);
}
- /** Send the given task in the mailbox associated with the specified alias*/
- public void taskSend(String mailbox, Task task) throws NativeException {
+ /** Send the given task in the mailbox associated with the specified alias
+ * @throws TimeoutException
+ * @throws HostFailureException
+ * @throws TransferFailureException */
+ public void taskSend(String mailbox, Task task) throws NativeException, TransferFailureException, HostFailureException, TimeoutException {
MsgNative.taskSend(mailbox, task, -1);
}
* Sends the task on the mailbox identified by the specified name
*
* @exception NativeException if the retrieval fails.
+ * @throws TimeoutException
+ * @throws HostFailureException
+ * @throws TransferFailureException
*/
- public void send(String mailbox) throws NativeException {
+ public void send(String mailbox) throws NativeException, TransferFailureException, HostFailureException, TimeoutException {
MsgNative.taskSend(mailbox, this, -1);
}
* Sends the task on the mailbox identified by the specified name (wait at most \a timeout seconds)
*
* @exception NativeException if the retrieval fails.
+ * @throws TimeoutException
+ * @throws HostFailureException
+ * @throws TransferFailureException
*/
- public void send(String mailbox, double timeout) throws NativeException {
+ public void send(String mailbox, double timeout) throws NativeException, TransferFailureException, HostFailureException, TimeoutException {
MsgNative.taskSend(mailbox, this, timeout);
}