package simgrid.msg;
-import java.lang.*;
import org.xml.sax.*;
-import org.xml.sax.helpers.*;
/**
* MSG was the first distributed programming environment
*
* @return The last error code of the simulation.
*/
- public final static native int getErrCode();
+ final static native int getErrCode();
/**
* Errors returned by the method Msg.getErrCode().
*
* @see Process constructors.
*/
- public final static native
+ final static native
void processCreate(Process process, Host host) throws JniException;
/**
*
* @return The function returns the PID of the next created process.
*/
- public final static native int processKillAll(int resetPID);
+ final static native int processKillAll(int resetPID);
/**
* The natively implemented method to suspend an MSG process.
*
* @see Process.pause()
*/
- public final static native void processSuspend(Process process)
+ final static native void processSuspend(Process process)
throws JniException, NativeException;
/**
*
* @see Process.kill()
*/
- public final static native void processKill(Process process)
+ final static native void processKill(Process process)
throws JniException;
/**
*
* @see Process.restart()
*/
- public final static native void processResume(Process process)
+ final static native void processResume(Process process)
throws JniException, NativeException;
/**
*
* @see Process.isSuspended()
*/
- public final static native boolean processIsSuspended(Process process) throws JniException;
+ final static native boolean processIsSuspended(Process process) throws JniException;
/**
* The natively implemented method to get the host of a MSG process.
*
* @see Process.getHost()
*/
- public final static native Host processGetHost(Process process)
+ final static native Host processGetHost(Process process)
throws JniException, NativeException;
/**
*
* @see Process.getFromPID()
*/
- public final static native Process processFromPID(int PID) throws NativeException;
+ final static native Process processFromPID(int PID) throws NativeException;
/**
* The natively implemented method to get the PID of a MSG process.
*
* @see Process.getPID()
*/
- public final static native int processGetPID(Process process) throws NativeException;
+ final static native int processGetPID(Process process) throws NativeException;
/**
* The natively implemented method to get the PPID of a MSG process.
*
* @see Process.getPPID()
*/
- public final static native int processGetPPID(Process process) throws NativeException;
+ final static native int processGetPPID(Process process) throws NativeException;
/**
* The natively implemented method to get the current running process.
* @see Process.currentProcess()
*/
- public final static native Process processSelf() throws NativeException;
+ final static native Process processSelf() throws NativeException;
/**
* The natively implemented method to get the current running process PID.
*
* @see Process.currentProcessPID()
*/
- public final static native int processSelfPID();
+ final static native int processSelfPID();
/**
* The natively implemented method to get the current running process PPID.
*
* @see Process.currentProcessPPID()
*/
- public final static native int processSelfPPID();
+ final static native int processSelfPPID();
/**
* The natively implemented method to migrate a process from his currnet host to a new host.
* @see Process.migrate()
* @see Host.getByName()
*/
- public final static native void processChangeHost(Process process,Host host)
+ final static native void processChangeHost(Process process,Host host)
throws JniException, NativeException;
/**
*
* @exception JniException if something goes wrong with JNI
*/
- public final static native void waitSignal(Process process) throws JniException;
+ final static native void waitSignal(Process process) throws JniException;
/**
* The natively implemented native to request the current process to sleep
*
* @see Process.waitFor()
*/
- public final static native void processWaitFor(double seconds) throws NativeException;
+ final static native void processWaitFor(double seconds) throws NativeException;
/**
* The natively implemented native method to exit a process.
*
* @see Process.exit()
*/
- public final static native void processExit(Process process) throws JniException;
+ final static native void processExit(Process process) throws JniException;
/******************************************************************
*
* @see Host.getByName()
*/
- public final static native Host hostGetByName(String name)
+ final static native Host hostGetByName(String name)
throws JniException, HostNotFoundException, NativeException;
/**
*
* @see Host.getName()
*/
- public final static native String hostGetName(Host host) throws JniException;
+ final static native String hostGetName(Host host) throws JniException;
/**
* The natively implemented method to get the number of hosts of the simulation.
*
* @see Host.getNumber()
*/
- public final static native int hostGetNumber();
+ final static native int hostGetNumber();
/**
* The natively implemented method to get the host of the current runing process.
*
* @see Host.currentHost()
*/
- public final static native Host hostSelf() throws JniException;
+ final static native Host hostSelf() throws JniException;
/**
* The natively implemented method to get the speed of a MSG host.
* @see Host.getSpeed()
*/
- public final static native double hostGetSpeed(Host host) throws JniException;
+ final static native double hostGetSpeed(Host host) throws JniException;
/**
* The natively implemented native method to test if an host is avail.
*
* @see Host.isAvail()
*/
- public final static native boolean hostIsAvail(Host host) throws JniException;
+ final static native boolean hostIsAvail(Host host) throws JniException;
/**
* The natively implemented native method to get all the hosts of the simulation.
* @return A array which contains all the hosts of simulation.
*/
- public final static native Host[] allHosts() throws JniException;
+ final static native Host[] allHosts() throws JniException;
/**
* The natively implemented native method to get the number of running tasks on a host.
* @exception JniException if something goes wrong with JNI
*
*/
- public final static native int hostGetLoad(Host host) throws JniException;
+ final static native int hostGetLoad(Host host) throws JniException;
/******************************************************************
* The natively implemented methods connected to the MSG task *
*
* @see Task.create()
*/
- public final static native void taskCreate(Task task,String name,double computeDuration, double messageSize)
+ final static native void taskCreate(Task task,String name,double computeDuration, double messageSize)
throws JniException, NullPointerException, IllegalArgumentException;
/**
*
* @see Task.getSender()
*/
- public final static native Process taskGetSender(Task task) throws JniException;
+ final static native Process taskGetSender(Task task) throws JniException;
/**
* The natively implementd method to get the source of a task.
*
* @see Task.getSource()
*/
- public final static native Host taskGetSource(Task task) throws JniException, NativeException;
+ final static native Host taskGetSource(Task task) throws JniException, NativeException;
/**
* The natively implemented method to get the name of the task.
*
* @see Task.getName()
*/
- public final static native String taskGetName(Task task) throws JniException;
+ final static native String taskGetName(Task task) throws JniException;
/**
* The natively implemented method to cancel a task.
*
* @see Task.cancel().
*/
- public final static native void taskCancel(Task task) throws JniException, NativeException;
+ final static native void taskCancel(Task task) throws JniException, NativeException;
/**
* The natively implemented method to get the computing amount of the task.
*
* @see Task.getComputeDuration()
*/
- public final static native double taskGetComputeDuration(Task task) throws JniException;
+ final static native double taskGetComputeDuration(Task task) throws JniException;
/**
* The natively implemented method to get the remaining computation
*
* @see Task.getRemainingDuration()
*/
- public final static native double taskGetRemainingDuration(Task task) throws JniException;
+ final static native double taskGetRemainingDuration(Task task) throws JniException;
/**
* The natively implemented method to set the priority of a task.
*
* @see Task.setPriority()
*/
- public final static native void taskSetPriority(Task task,double priority) throws JniException;
+ final static native void taskSetPriority(Task task,double priority) throws JniException;
/**
* The natively implemented method to destroy a MSG task.
*
* @see Task.destroy()
*/
- public final static native void taskDestroy(Task task) throws JniException, NativeException;
+ final static native void taskDestroy(Task task) throws JniException, NativeException;
/**
* The natively implemented method to execute a MSG task.
*
* @see Task.execute()
*/
- public final static native void taskExecute(Task task) throws JniException, NativeException;
+ final static native void taskExecute(Task task) throws JniException, NativeException;
*
* @see ParallelTask.create()
*/
- public final static native void parallelTaskCreate(ParallelTask parallelTask, String name,
+ final static native void parallelTaskCreate(ParallelTask parallelTask, String name,
Host[] hosts, double[] computeDurations, double[] messageSizes)
throws JniException, NullPointerException, IllegalArgumentException;
*
* @see ParallelTask.getSender()
*/
- public final static native Process parallelTaskGetSender(ParallelTask parallelTask) throws JniException;
+ final static native Process parallelTaskGetSender(ParallelTask parallelTask) throws JniException;
/**
* The natively implementd method to get the source of a parallel task.
*
* @see ParallelTask.getSource()
*/
- public final static native Host parallelTaskGetSource(ParallelTask parallelTask) throws JniException;
+ final static native Host parallelTaskGetSource(ParallelTask parallelTask) throws JniException;
/**
* The natively implemented method to get the name of the parallel task.
*
* @see ParallelTask.getName()
*/
- public final static native String parallelTaskGetName(ParallelTask parallelTask) throws JniException;
+ final static native String parallelTaskGetName(ParallelTask parallelTask) throws JniException;
/**
* The natively implemented method to cancel a parallel task.
*
* @see ParallelTask.cancel().
*/
- public final static native void parallelTaskCancel(ParallelTask parallelTask) throws JniException,NativeException;
+ final static native void parallelTaskCancel(ParallelTask parallelTask) throws JniException,NativeException;
/**
* The natively implemented method to get the computing amount of the task.
*
* @see ParallelTask.getComputeDuration()
*/
- public final static native double parallelTaskGetComputeDuration(ParallelTask parallelTask) throws JniException;
+ final static native double parallelTaskGetComputeDuration(ParallelTask parallelTask) throws JniException;
/**
* The natively implemented method to get the remaining computation
*
* @see ParallelTask.getRemainingDuration()
*/
- public final static native double parallelTaskGetRemainingDuration(ParallelTask parallelTask) throws JniException;
+ final static native double parallelTaskGetRemainingDuration(ParallelTask parallelTask) throws JniException;
/**
* The natively implemented method to set the priority of a parallel task.
*
* @see ParallelTask.setPriority()
*/
- public final static native void parallelTaskSetPriority(ParallelTask parallelTask,double priority) throws JniException;
+ final static native void parallelTaskSetPriority(ParallelTask parallelTask,double priority) throws JniException;
/**
* The natively implemented method to destroy a MSG parallel task.
*
* @see ParallelTask.destroy()
*/
- public final static native void parallelTaskDestroy(ParallelTask parallelTask) throws JniException,NativeException;
+ final static native void parallelTaskDestroy(ParallelTask parallelTask) throws JniException,NativeException;
/**
* The natively implemented method to execute a MSG parallel task.
*
* @see ParallelTask.execute()
*/
- public final static native void parallelTaskExecute(ParallelTask parallelTask) throws JniException, NativeException;
+ final static native void parallelTaskExecute(ParallelTask parallelTask) throws JniException, NativeException;
/******************************************************************
* The natively implemented methods connected to the MSG channel *
*
* @see Channel.get()
*/
- public final static native Task channelGet(Channel channel) throws JniException,NativeException;
+ final static native Task channelGet(Channel channel) throws JniException,NativeException;
/**
* The natively implemented method to listen on the channel and wait for receiving a task with a timeout.
* @see Channel.getWithTimeout()
*
*/
- public final static native Task channelGetWithTimeout(Channel channel,double timeout) throws JniException,NativeException;
+ final static native Task channelGetWithTimeout(Channel channel,double timeout) throws JniException,NativeException;
/**
*
* @see Channel.getFromHost()
*/
- public final static native Task channelGetFromHost(Channel channel,Host host) throws JniException,NativeException;
+ final static native Task channelGetFromHost(Channel channel,Host host) throws JniException,NativeException;
/**
* The natively implemented method to test whether there is a pending communication on the channel.
*
* @see Channel.hasPendingCommunication()
*/
- public final static native boolean channelHasPendingCommunication(Channel channel) throws JniException;
+ final static native boolean channelHasPendingCommunication(Channel channel) throws JniException;
/**
* The natively implemented method to test whether there is a pending communication on a
*
* @see Channel.getCummunicatingProcess()
*/
- public final static native int channelGetCommunicatingProcess(Channel channel) throws JniException;
+ final static native int channelGetCommunicatingProcess(Channel channel) throws JniException;
/**
* The natively implemented method to get the number of tasks waiting to be received on a
*
* @see Channel.getHostWaiting()
*/
- public final static native int channelGetHostWaitingTasks(Channel channel,Host host) throws JniException;
+ final static native int channelGetHostWaitingTasks(Channel channel,Host host) throws JniException;
/**
* The natively implemented method to put a task on the channel of an host.
*
* @see Channel.put()
*/
- public final static native void channelPut(Channel channel,Task task,Host host) throws JniException,NativeException;
+ final static native void channelPut(Channel channel,Task task,Host host) throws JniException,NativeException;
/**
* The natively implemented method to put a task on a channel of an host (with a timeout
*
* @see Channel.putWithTimeout()
*/
- public final static native void channelPutWithTimeout(Channel channel,Task task,Host host,double timeout) throws JniException,NativeException;
+ final static native void channelPutWithTimeout(Channel channel,Task task,Host host,double timeout) throws JniException,NativeException;
/**
* The natively implemented method to put a task on channel with a bounded transmition
*
* @see Channel.putBounded()
*/
- public final static native void channelPutBounded(Channel channel,Task task,Host host,double max_rate) throws JniException,NativeException;
+ final static native void channelPutBounded(Channel channel,Task task,Host host,double max_rate) throws JniException,NativeException;
/**
* The natively implemented method to wait for at most timeout seconds for a task reception
*
* @see Channel.wait()
*/
- public final static native int channelWait(Channel channel, double timeout) throws JniException,NativeException;
+ final static native int channelWait(Channel channel, double timeout) throws JniException,NativeException;
/**
* The natively implemented method to set the number of channel used by all the process
*
* @see Channel.setNumber()
*/
- public final static native void channelSetNumber(int channelNumber);
+ final static native void channelSetNumber(int channelNumber);
/**
* The natively implemented method to get the number of channel of the process of the simulation.
*
* @see Channel.getNumber()
*/
- public final static native int channelGetNumber();
+ final static native int channelGetNumber();
/*********************************************************************************
* Additional native methods *
try {
Class c = Class.forName("com.sun.org.apache.xerces.internal.parsers.SAXParser");
XMLReader reader = (XMLReader)c.newInstance();
+ reader.setEntityResolver(new DTDResolver());
ApplicationHandler handler = new ApplicationHandler();
reader.setContentHandler(handler);
reader.setFeature("http://xml.org/sax/features/validation", false);