-/*
- * Bindings to the MSG hosts
- *
- * Copyright (c) 2006-2013. The SimGrid Team.
- * All right reserved.
- *
- * This program is free software; you can redistribute
- * it and/or modify it under the terms of the license
- *(GNU LGPL) which comes with this package.
- *
- */
+/* Bindings to the MSG hosts */
+
+/* Copyright (c) 2006-2014. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
package org.simgrid.msg;
/**
/**
* Host name
*/
- private String name;
+ protected String name;
/**
* User data.
this.bind = 0;
this.data = null;
};
+
+ public String toString (){
+ return this.name;
+
+ }
/**
* This static method gets an host instance associated with a native
public String getName() {
return name;
}
+
/**
* Sets the data of the host.
* @param data
return null != this.data;
}
+ /**
+ * This method start the host if it is off
+ */
+ public native void on();
+
+ /**
+ * This method stop the host if it is on
+ */
+ public native void off();
+
+
/**
* This method returns the number of tasks currently running on a host.
* The external load is not taken in account.
* Returns the value of a given host property.
*/
public native String getProperty(String name);
+
/**
* Change the value of a given host property.
*/
public native void setProperty(String name, String value);
- /** This method tests if a host is available.
+
+ /** This method tests if a host is available.
* @return True if the host is available.
*/
public native boolean isAvail();