public class Host
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
Modifier | Constructor and Description |
---|---|
protected |
Host() |
Modifier and Type | Method and Description |
---|---|
static Host[] |
all()
Returns all hosts of the installed platform.
|
static Host |
currentHost()
Returns the host of the current process.
|
java.lang.String[] |
getAttachedStorage()
This methods returns the list of storages (names) attached to an host
|
static Host |
getByName(java.lang.String name)
This static method gets an host instance associated with a native
host of your platform.
|
double |
getConsumedEnergy()
Returns the amount of Joules consumed by that host so far
|
double |
getCoreNumber() |
static int |
getCount()
Counts the installed hosts.
|
java.lang.Object |
getData() |
Storage[] |
getMountedStorage()
Returns the list of mount point names on an host
|
java.lang.String |
getName() |
java.lang.String |
getProperty(java.lang.String name) |
double |
getSpeed()
This method returns the speed of the processor of a host (in flops),
regardless of the current load of the machine.
|
boolean |
hasData()
Returns true if the host has an associated data object.
|
boolean |
isOn()
Tests if an host is up and running.
|
static void |
nativeInit()
Class initializer, to initialize various JNI stuff
|
void |
off()
Stops the host if it is on
|
void |
on()
Starts the host if it is off
|
static void |
setAsyncMailbox(java.lang.String mailboxName)
This static method sets a mailbox to receive in asynchronous mode.
|
void |
setData(java.lang.Object data) |
void |
setProperty(java.lang.String name,
java.lang.String value) |
java.lang.String |
toString() |
public java.lang.String toString()
toString
in class java.lang.Object
public static Host getByName(java.lang.String name) throws HostNotFoundException, java.lang.NullPointerException
name
- The name of the host to get.HostNotFoundException
- if the name of the host is not valid.
NativeException if the native version of this method failed.java.lang.NullPointerException
public static int getCount()
public static Host currentHost()
public static Host[] all()
public static void setAsyncMailbox(java.lang.String mailboxName)
mailboxName
- The name of the mailboxpublic java.lang.String getName()
public void setData(java.lang.Object data)
public java.lang.Object getData()
public boolean hasData()
public void on()
public void off()
public double getSpeed()
public double getCoreNumber()
public java.lang.String getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.String value)
public boolean isOn()
public Storage[] getMountedStorage()
public java.lang.String[] getAttachedStorage()
public double getConsumedEnergy()
public static void nativeInit()