Package org.opennebula.client.host
Class HostPool
- java.lang.Object
-
- org.opennebula.client.Pool
-
- org.opennebula.client.host.HostPool
-
-
Field Summary
-
Fields inherited from class org.opennebula.client.Pool
ALL, client, elementName, GROUP, infoMethod, MINE, MINE_GROUP, poolElements, xpath
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PoolElementfactory(org.w3c.dom.Node node)The factory method returns a suitable PoolElement object from an XML node.HostgetById(int id)Returns the Host with the given Id from the pool.OneResponseinfo()Loads the xml representation of the host pool.static OneResponseinfo(Client client)Retrieves all the hosts in the pool.java.util.Iterator<Host>iterator()OneResponsemonitoring()Retrieves the monitoring data for all the hosts in the pool.static OneResponsemonitoring(Client client)Retrieves the monitoring data for all the hosts in the pool.static OneResponsemonitoring(Client client, int num)Retrieves the monitoring data for all the hosts in the pool.-
Methods inherited from class org.opennebula.client.Pool
getLength, info, info, info, infoAll, infoAll, infoGroup, infoGroup, infoGroupPrimary, infoMine, infoMine, item, processInfo, xmlrpcInfo
-
-
-
-
Constructor Detail
-
HostPool
public HostPool(Client client)
Creates a new host pool- Parameters:
client- XML-RPC Client.
-
-
Method Detail
-
factory
public PoolElement factory(org.w3c.dom.Node node)
Description copied from class:PoolThe factory method returns a suitable PoolElement object from an XML node. Each Pool must implement the corresponding factory method.
-
info
public static OneResponse info(Client client)
Retrieves all the hosts in the pool.- Parameters:
client- XML-RPC Client.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
monitoring
public static OneResponse monitoring(Client client)
Retrieves the monitoring data for all the hosts in the pool.- Parameters:
client- XML-RPC Client.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
monitoring
public static OneResponse monitoring(Client client, int num)
Retrieves the monitoring data for all the hosts in the pool.- Parameters:
client- XML-RPC Client.num- : Retrieve monitor records in the last num seconds. 0 just the last record, -1 all records.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
info
public OneResponse info()
Loads the xml representation of the host pool.- Overrides:
infoin classPool- See Also:
info(Client)
-
monitoring
public OneResponse monitoring()
Retrieves the monitoring data for all the hosts in the pool.- Returns:
- If successful the message contains the string with the information returned by OpenNebula.
-
iterator
public java.util.Iterator<Host> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<Host>
-
-