public class Host
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
Host name
|
Modifier | Constructor and Description |
---|---|
protected |
Host() |
Modifier and Type | Method and Description |
---|---|
static Host[] |
all()
This static method returns all of the hosts of the installed platform.
|
static Host |
currentHost()
This static method return an instance to the host of the current process.
|
static Host |
getByName(java.lang.String name)
This static method gets an host instance associated with a native
host of your platform.
|
double |
getCoreNumber()
This method returns the number of core of a host.
|
static int |
getCount()
This static method returns the count of the installed hosts.
|
java.lang.Object |
getData()
Gets the data of the host.
|
int |
getLoad()
This method returns the number of tasks currently running on a host.
|
java.lang.String |
getName()
This method returns the name of a host.
|
java.lang.String |
getProperty(java.lang.String name)
Returns the value of a given host property.
|
double |
getSpeed()
This method returns the speed of the processor of a host,
regardless of the current load of the machine.
|
boolean |
hasData()
Checks whether a host has data.
|
boolean |
isAvail()
This method tests if a host is available.
|
static void |
nativeInit()
Class initializer, to initialize various JNI stuff
|
void |
off()
This method stop the host if it is on
|
void |
on()
This method start 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)
Sets the data of the host.
|
void |
setProperty(java.lang.String name,
java.lang.String value)
Change the value of a given host property.
|
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)
data
- public java.lang.Object getData()
public boolean hasData()
public void on()
public void off()
public int getLoad()
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 isAvail()
public static void nativeInit()