X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/10d24bfbe5d413bdb49bf12b9655fc73203cd4f0..16bbb8a8212497d9c44c81333ed2c0e689e0c5af:/src/bindings/java/jmsg_task.h diff --git a/src/bindings/java/jmsg_task.h b/src/bindings/java/jmsg_task.h index b7c7036163..2a89b6e2ab 100644 --- a/src/bindings/java/jmsg_task.h +++ b/src/bindings/java/jmsg_task.h @@ -1,6 +1,6 @@ /* Functions related to the java task instances. */ -/* Copyright (c) 2007-2014. The SimGrid Team. +/* Copyright (c) 2007-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -12,34 +12,35 @@ #include #include "simgrid/msg.h" +SG_BEGIN_DECL() /** * This function associated a native task to a java task instance. * - * @param jtask The java task instance. - * @param task The native task to bind. - * @param env The environment of the current thread. + * @param jtask The java task instance. + * @param task The native task to bind. + * @param env The environment of the current thread. * - * @exception If the class Task is not found the function throws - * the ClassNotFoundException. If the field bind of - * this class is not found the function throws the exception - * NotSuchFieldException. + * @exception If the class Task is not found the function throws + * the ClassNotFoundException. If the field bind of + * this class is not found the function throws the exception + * NotSuchFieldException. */ void jtask_bind(jobject jtask, msg_task_t task, JNIEnv * env); /** * This function returns a native task from a java task instance. * - * @param jtask The java task object from which get the native task. - * @param env The environment of the current thread. + * @param jtask The java task object from which get the native task. + * @param env The environment of the current thread. * - * @return The function returns the native task associated to the - * java task object. + * @return The function returns the native task associated to the + * java task object. * - * @exception If the class Task is not found the function throws - * the ClassNotFoundException. If the field bind of - * this class is not found the function throws the exception - * NotSuchFieldException. + * @exception If the class Task is not found the function throws + * the ClassNotFoundException. If the field bind of + * this class is not found the function throws the exception + * NotSuchFieldException. */ msg_task_t jtask_to_native_task(jobject jtask, JNIEnv * env); @@ -48,144 +49,146 @@ msg_task_t jtask_to_native_task(jobject jtask, JNIEnv * env); * A java task object is valid if it is bind to a native * task. * - * @param jtask The java task to test the validity. - * @param env The environment of the current thread. + * @param jtask The java task to test the validity. + * @param env The environment of the current thread. * - * @return If the java task is valid the function returns true. - * Otherwise the function returns false. + * @return If the java task is valid the function returns true. + * Otherwise the function returns false. */ jboolean jtask_is_valid(jobject jtask, JNIEnv * env); /* - * Class org_simgrid_msg_Task - * Method nativeInit - * Signature (); + * Class org_simgrid_msg_Task + * Method nativeInit + * Signature (); */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls); /* - * Class org_simgrid_msg_Task - * Method create + * Class org_simgrid_msg_Task + * Method create */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_create - (JNIEnv * env, jobject jtask, jstring jname, jdouble jcomputeDuration, jdouble jmessageSize); + (JNIEnv * env, jobject jtask, jstring jname, jdouble jcomputeDuration, jdouble jmessageSize); +JNIEXPORT void JNICALL +Java_org_simgrid_msg_Task_nativeFinalize(JNIEnv * env, jobject jtask); /* - * Class org_simgrid_msg_Task - * Method parallelCreate + * Class org_simgrid_msg_Task + * Method parallelCreate */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_parallelCreate - (JNIEnv *, jobject, + (JNIEnv *, jobject, jstring, jobjectArray, jdoubleArray, jdoubleArray); /* - * Class org_simgrid_msg_Task - * Method destroy - * Signature (Lsimgrid/msg/Task;)V + * Class org_simgrid_msg_Task + * Method destroy + * Signature (Lsimgrid/msg/Task;)V */ /* JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_destroy */ /* (JNIEnv *, jobject); */ /* - * Class org_simgrid_msg_Task - * Method cancel - * Signature ()V + * Class org_simgrid_msg_Task + * Method cancel + * Signature ()V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_cancel (JNIEnv *, jobject); /* - * Class org_simgrid_msg_Task - * Method execute - * Signature ()V + * Class org_simgrid_msg_Task + * Method execute + * Signature ()V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_execute (JNIEnv *, jobject); /* - * Class org_simgrid_msg_Task - * Method setBound - * Signature ()V + * Class org_simgrid_msg_Task + * Method setBound + * Signature ()V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setBound (JNIEnv *, jobject, jdouble); /* - * Class org_simgrid_msg_Task - * Method getName - * Signature ()Ljava/lang/String; + * Class org_simgrid_msg_Task + * Method getName + * Signature ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_simgrid_msg_Task_getName (JNIEnv *, jobject); /* - * Class org_simgrid_msg_Task - * Method getSender - * Signature ()Lsimgrid/msg/Process; + * Class org_simgrid_msg_Task + * Method getSender + * Signature ()Lsimgrid/msg/Process; */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_getSender (JNIEnv *, jobject); /* - * Class org_simgrid_msg_Task - * Method getSource - * Signature ()Lsimgrid/msg/Host; + * Class org_simgrid_msg_Task + * Method getSource + * Signature ()Lsimgrid/msg/Host; */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_getSource (JNIEnv *, jobject); /* - * Class org_simgrid_msg_Task - * Method getFlopsAmount - * Signature ()D + * Class org_simgrid_msg_Task + * Method getFlopsAmount + * Signature ()D */ JNIEXPORT jdouble JNICALL Java_org_simgrid_msg_Task_getFlopsAmount (JNIEnv *, jobject); /** - * Class org_simgrid_msg_Task - * Method setName - * Signature (Ljava/lang/string;)V + * Class org_simgrid_msg_Task + * Method setName + * Signature (Ljava/lang/string;)V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jtask, jobject jname); /* - * Class org_simgrid_msg_Task - * Method setPriority - * Signature (D)V + * Class org_simgrid_msg_Task + * Method setPriority + * Signature (D)V */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setPriority (JNIEnv *, jobject, jdouble); /** - * Class org_simgrid_msg_Task - * Method setComputeDuration - * Signature (D)V + * Class org_simgrid_msg_Task + * Method setComputeDuration + * Signature (D)V */ JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setComputeDuration - (JNIEnv *env, jobject jtask, jdouble computationAmount); - - /** - * Class org_simgrid_msg_Task - * Method setDataSize - * Signature (D)V +Java_org_simgrid_msg_Task_setFlopsAmount + (JNIEnv *env, jobject jtask, jdouble computationAmount); + + /** + * Class org_simgrid_msg_Task + * Method setDataSize + * Signature (D)V */ JNIEXPORT void JNICALL -Java_org_simgrid_msg_Task_setDataSize - (JNIEnv *env, jobject jtask, jdouble dataSize); - +Java_org_simgrid_msg_Task_setBytesAmount + (JNIEnv *env, jobject jtask, jdouble dataSize); + /** - * Class org_simgrid_msg_Task - * Method send + * Class org_simgrid_msg_Task + * Method send */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_send (JNIEnv *, jobject, jstring, jdouble); /** - * Class org_simgrid_msg_Task - * Method sendBounded + * Class org_simgrid_msg_Task + * Method sendBounded */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_sendBounded @@ -193,85 +196,85 @@ JNIEXPORT void JNICALL /** - * Class org_simgrid_msg_Task - * Method receive + * Class org_simgrid_msg_Task + * Method receive */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_receive (JNIEnv *, jclass, jstring, jdouble, jobject); /** - * Class org_simgrid_msg_Task - * Method irecv - * Signature (Ljava/lang/String;)Lorg/simgrid/msg/Comm; + * Class org_simgrid_msg_Task + * Method irecv + * Signature (Ljava/lang/String;)Lorg/simgrid/msg/Comm; */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_irecv(JNIEnv * env, jclass cls, jstring jmailbox); /** - * Class org_simgrid_msg_Task - * Method receiveBounded + * Class org_simgrid_msg_Task + * Method receiveBounded */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_receiveBounded(JNIEnv * env, jclass cls, jstring jalias, jdouble jtimeout, jobject jhost, jdouble rate); /** - * Class org_simgrid_msg_Task - * Method irecvBounded + * Class org_simgrid_msg_Task + * Method irecvBounded */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_irecvBounded(JNIEnv * env, jclass cls, jstring jmailbox, jdouble rate); /** - * Class org_simgrid_msg_Task - * Method isend - * Signature (Lorg/simgrid/msg/Task;Ljava/lang/String;)Lorg/simgrid/msg/Comm; + * Class org_simgrid_msg_Task + * Method isend + * Signature (Lorg/simgrid/msg/Task;Ljava/lang/String;)Lorg/simgrid/msg/Comm; */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isend(JNIEnv *env, jobject jtask, jstring jmailbox); /** - * Class org_simgrid_msg_Task - * Method isendBounded + * Class org_simgrid_msg_Task + * Method isendBounded */ JNIEXPORT jobject JNICALL Java_org_simgrid_msg_Task_isendBounded(JNIEnv *env, jobject jtask, jstring jmailbox, jdouble maxrate); /** - * Class org_simgrid_msg_Task - * Method dsend + * Class org_simgrid_msg_Task + * Method dsend */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsend(JNIEnv * env, jobject jtask, jstring jalias); /** - * Class org_simgrid_msg_Task - * Method dsendBounded + * Class org_simgrid_msg_Task + * Method dsendBounded */ JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_dsendBounded(JNIEnv * env, jobject jtask, jstring jalias, jdouble maxrate); /** - * Class org_simgrid_msg_Task - * Method listen + * Class org_simgrid_msg_Task + * Method listen */ JNIEXPORT jboolean JNICALL Java_org_simgrid_msg_Task_listen(JNIEnv *, jclass, jstring); /** - * Class org_simgrid_msg_Task - * Method listenFromHost + * Class org_simgrid_msg_Task + * Method listenFromHost */ JNIEXPORT jint JNICALL Java_org_simgrid_msg_Task_listenFromHost(JNIEnv *, jclass, jstring, jobject); /** - * Class org_simgrid_msg_Task - * Method listenFrom + * Class org_simgrid_msg_Task + * Method listenFrom */ JNIEXPORT jint JNICALL Java_org_simgrid_msg_Task_listenFrom(JNIEnv *, jclass, jstring); - +SG_END_DECL() #endif /* !MSG_JTASK_H */