Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Preset JAVA_INCLUDE_PATH to user env variable.
[simgrid.git] / org / simgrid / msg / Host.java
index 11e6bda..136f4b2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Bindings to the MSG hosts
  *
- * Copyright 2006,2007,2010 The SimGrid Team           
+ * Copyright 2006-2012 The SimGrid Team           
  * All right reserved. 
  *
  * This program is free software; you can redistribute 
@@ -49,8 +49,11 @@ public class Host {
         *
         * @see                         Host.getByName().
         */ 
-       public long bind;
-
+       private long bind;
+       /**
+        * Host name
+        */
+       private String name;
 
        /**
         * User data.
@@ -101,11 +104,12 @@ public class Host {
 
        /**
         * This method returns the name of a host.
-        * FIXME: Cache it.
         * @return                      The name of the host.
         *
         */ 
-       public native String getName();
+       public String getName() {
+               return name;
+       }
        /**
         * Sets the data of the host.
      * @param data
@@ -147,11 +151,24 @@ public class Host {
         *
         */ 
        public native double getSpeed();
-
+       /**
+        * @brief Returns the value of a given host property. 
+        */
+       public native String getProperty(String name);
+       /**
+        * @brief Change the value of a given host property. 
+        */
+       public native void setProperty(String name, String value);
     /** This method tests if a host is avail.
      * @return
      */
        public native boolean isAvail();
        
-       
+       /**
+        * Class initializer, to initialize various JNI stuff
+        */
+       public static native void nativeInit();
+       static {
+               nativeInit();
+       }       
 }