Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
eb800fd7cb9a1f771ebc8379a43e877057902ef5
[simgrid.git] / src / jmsg.h
1 /* Java Wrappers to the MSG API.                                            */
2
3 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7   * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef MSG4JAVA_H
10 #define MSG4JAVA_H
11
12 #include <jni.h>
13
14 JavaVM *get_java_VM(void);
15
16 JNIEnv *get_current_thread_env(void);
17
18 /*
19  * Class                simgrid_msg_Msg
20  * Method               processCreate
21  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
22  */
23 JNIEXPORT void JNICALL
24 Java_org_simgrid_msg_MsgNative_processCreate(JNIEnv * env, jclass cls,
25                                          jobject jprocess, jobject jhost);
26
27
28
29 /*
30  * Class                simgrid_msg_Msg
31  * Method               processSuspend
32  * Signature    (Lsimgrid/msg/Process;)V
33  */
34 JNIEXPORT void JNICALL
35 Java_org_simgrid_msg_MsgNative_processSuspend(JNIEnv * env, jobject obj,
36                                           jobject jprocess);
37
38 /*
39  * Class                simgrid_msg_Msg
40  * Method               processResume
41  * Signature    (Lsimgrid/msg/Process;)V
42  */
43 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processResume
44     (JNIEnv *, jclass, jobject);
45
46
47 JNIEXPORT void JNICALL
48 Java_org_simgrid_msg_Process_simulatedSleep(JNIEnv * env, jclass cls,
49                                            jdouble jmillis);
50
51
52 /*
53  * Class                simgrid_msg_Msg
54  * Method               processIsSuspended
55  * Signature    (Lsimgrid/msg/Process;)Z
56  */
57 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_MsgNative_processIsSuspended
58     (JNIEnv *, jclass, jobject);
59
60 /*
61  * Class                simgrid_msg_Msg
62  * Method               processKill
63  * Signature    (Lsimgrid/msg/Process;)V
64  */
65 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processKill
66     (JNIEnv *, jclass, jobject);
67
68 /*
69  * Class                simgrid_msg_Msg
70  * Method               processGetHost
71  * Signature    (Lsimgrid/msg/Process;)Lsimgrid/msg/Host;
72  */
73 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processGetHost
74     (JNIEnv *, jclass, jobject);
75
76 /*
77  * Class                simgrid_msg_Msg
78  * Method               processFromPID
79  * Signature    (I)Lsimgrid/msg/Process;
80  */
81 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processFromPID
82     (JNIEnv *, jclass, jint);
83
84 /*
85  * Class                simgrid_msg_Msg
86  * Method               processGetPID
87  * Signature    (Lsimgrid/msg/Process;)I
88  */
89 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processGetPID
90     (JNIEnv *, jclass, jobject);
91
92 /*
93  * Class                simgrid_msg_Msg
94  * Method               processGetPPID
95  * Signature    (Lsimgrid/msg/Process;)I
96  */
97 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processGetPPID
98     (JNIEnv *, jclass, jobject);
99
100 /*
101  * Class                simgrid_msg_Msg
102  * Method               processSelf
103  * Signature    ()Lsimgrid/msg/Process;
104  */
105 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_processSelf
106     (JNIEnv *, jclass);
107
108 /*
109  * Class                simgrid_msg_Msg
110  * Method               processSelfPID
111  * Signature    ()I
112  */
113 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processSelfPID
114     (JNIEnv *, jclass);
115
116 /*
117  * Class                simgrid_msg_Msg
118  * Method               processSelfPPID
119  * Signature    ()I
120  */
121 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processSelfPPID
122     (JNIEnv *, jclass);
123
124 /*
125  * Class                simgrid_msg_Msg
126  * Method               processMigrate
127  * Signature    (Lsimgrid/msg/Process;Lsimgrid/msg/Host;)V
128  */
129 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processMigrate
130     (JNIEnv *, jclass, jobject, jobject);
131
132 /*
133  * Class                simgrid_msg_Msg
134  * Method               processWaitFor
135  * Signature    (D)V
136  */
137 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processWaitFor
138     (JNIEnv *, jclass, jdouble);
139
140 /*
141  * Class                simgrid_msg_Msg
142  * Method               hostGetByName
143  * Signature    (Ljava/lang/String;)Lsimgrid/msg/Host;
144  */
145 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_hostGetByName
146     (JNIEnv *, jclass, jstring);
147
148 /*
149  * Class                simgrid_msg_Msg
150  * Method               hostGetName
151  * Signature    (Lsimgrid/msg/Host;)Ljava/lang/String;
152  */
153 JNIEXPORT jstring JNICALL Java_org_simgrid_msg_MsgNative_hostGetName
154     (JNIEnv *, jclass, jobject);
155
156 /*
157  * Class                simgrid_msg_Msg
158  * Method               hostGetNumber
159  * Signature    ()I
160  */
161 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_hostGetNumber
162     (JNIEnv *, jclass);
163
164 /*
165  * Class                simgrid_msg_Msg
166  * Method               hostSelf
167  * Signature    ()Lsimgrid/msg/Host;
168  */
169 JNIEXPORT jobject JNICALL Java_org_simgrid_msg_MsgNative_hostSelf
170     (JNIEnv *, jclass);
171
172 /*
173  * Class                simgrid_msg_Msg
174  * Method               hostGetSpeed
175  * Signature    (Lsimgrid/msg/Host;)D
176  */
177 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_MsgNative_hostGetSpeed
178     (JNIEnv *, jclass, jobject);
179
180 JNIEXPORT jint JNICALL
181 Java_org_simgrid_msg_MsgNative_hostGetLoad(JNIEnv * env, jclass cls,
182                                        jobject jhost);
183
184 /*
185  * Class                simgrid_msg_Msg
186  * Method               hostIsAvail
187  * Signature    (Lsimgrid/msg/Host;)Z
188  */
189 JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_MsgNative_hostIsAvail
190     (JNIEnv *, jclass, jobject);
191
192 /*
193  * Class                simgrid_msg_Msg
194  * Method               getClock
195  * Signature    ()D
196  */
197 JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Msg_getClock(JNIEnv *, jclass);
198
199 JNIEXPORT void JNICALL
200     JNICALL Java_org_simgrid_msg_Msg_run(JNIEnv * env, jclass cls);
201 JNIEXPORT void JNICALL
202     JNICALL Java_org_simgrid_msg_Msg_clean(JNIEnv * env, jclass cls);
203
204 JNIEXPORT void JNICALL
205 Java_org_simgrid_msg_Msg_init(JNIEnv * env, jclass cls, jobjectArray jargs);
206
207 /*
208  * Class                simgrid_msg_Msg
209  * Method               processKillAll
210  * Signature    (I)I
211  */
212 JNIEXPORT jint JNICALL Java_org_simgrid_msg_MsgNative_processKillAll
213     (JNIEnv *, jclass, jint);
214
215 /*
216  * Class                simgrid_msg_Msg
217  * Method               processExit
218  * Signature    (Lsimgrid/msg/Process;)V
219  */
220 JNIEXPORT void JNICALL Java_org_simgrid_msg_MsgNative_processExit
221     (JNIEnv *, jclass, jobject);
222
223 JNIEXPORT void JNICALL Java_org_simgrid_msg_Msg_info(JNIEnv *, jclass,
224                                                  jstring);
225
226 JNIEXPORT jobjectArray JNICALL
227 Java_org_simgrid_msg_MsgNative_allHosts(JNIEnv *, jclass);
228
229 JNIEXPORT void JNICALL
230 Java_org_simgrid_msg_Msg_createEnvironment(JNIEnv * env, jclass cls,
231                                        jstring jplatformFile);
232
233 JNIEXPORT void JNICALL
234 Java_org_simgrid_msg_Msg_deployApplication(JNIEnv * env, jclass cls,
235                                        jstring jdeploymentFile);
236
237 #endif                          /* !MSG4JAVA_H */