org.virtualbox_4_3
Class IHost

java.lang.Object
  extended by org.virtualbox_4_3.IUnknown
      extended by org.virtualbox_4_3.IHost

public class IHost
extends IUnknown

The IHost interface represents the physical machine that this VirtualBox installation runs on. An object implementing this interface is returned by the IVirtualBox.getHost()attribute. This interface contains read-only information about the host's physical hardware (such as what processors and disks are available, what the host operating system is, and so on) and also allows for manipulating some of the host's hardware, such as global USB device filters and host interface networking. Interface ID: {93269330-48CA-4096-B4A2-1189DF336267}


Field Summary
 
Fields inherited from class org.virtualbox_4_3.IUnknown
obj, port
 
Constructor Summary
IHost(java.lang.String wrapped, org.virtualbox_4_3.jaxws.VboxPortType port)
           
 
Method Summary
 IProgress createHostOnlyNetworkInterface(Holder<IHostNetworkInterface> hostInterface)
          Creates a new adapter for Host Only Networking.
 IHostUSBDeviceFilter createUSBDeviceFilter(java.lang.String name)
          Creates a new USB device filter.
 IMedium findHostDVDDrive(java.lang.String name)
          Searches for a host DVD drive with the given name.
 IMedium findHostFloppyDrive(java.lang.String name)
          Searches for a host floppy drive with the given name.
 IHostNetworkInterface findHostNetworkInterfaceById(java.lang.String id)
          Searches through all host network interfaces for an interface with the given GUID.
 IHostNetworkInterface findHostNetworkInterfaceByName(java.lang.String name)
          Searches through all host network interfaces for an interface with the given name.
 java.util.List<IHostNetworkInterface> findHostNetworkInterfacesOfType(HostNetworkInterfaceType type)
          Searches through all host network interfaces and returns a list of interfaces of the specified type
 IHostUSBDevice findUSBDeviceByAddress(java.lang.String name)
          Searches for a USB device with the given host address.
 IHostUSBDevice findUSBDeviceById(java.lang.String id)
          Searches for a USB device with the given UUID.
 java.lang.String generateMACAddress()
          Generates a valid Ethernet MAC address, 12 hexadecimal characters.
 java.lang.Boolean getAcceleration3DAvailable()
          Returns true when the host supports 3D hardware acceleration.
 java.lang.String getDomainName()
          Domain name used for name resolving.
 java.util.List<IMedium> getDVDDrives()
          List of DVD drives available on the host.
 java.util.List<IMedium> getFloppyDrives()
          List of floppy drives available on the host.
 java.lang.Long getMemoryAvailable()
          Available system memory in the host system.
 java.lang.Long getMemorySize()
          Amount of system memory in megabytes installed in the host system.
 java.util.List<java.lang.String> getNameServers()
          The list of nameservers registered in host's name resolving system.
 java.util.List<IHostNetworkInterface> getNetworkInterfaces()
          List of host network interfaces currently defined on the host.
 java.lang.String getOperatingSystem()
          Name of the host system's operating system.
 java.lang.String getOSVersion()
          Host operating system's version string.
 java.lang.Long getProcessorCoreCount()
          Number of physical processor cores installed in the host system.
 java.lang.Long getProcessorCount()
          Number of (logical) CPUs installed in the host system.
 void getProcessorCPUIDLeaf(java.lang.Long cpuId, java.lang.Long leaf, java.lang.Long subLeaf, Holder<java.lang.Long> valEax, Holder<java.lang.Long> valEbx, Holder<java.lang.Long> valEcx, Holder<java.lang.Long> valEdx)
          Returns the CPU cpuid information for the specified leaf.
 java.lang.String getProcessorDescription(java.lang.Long cpuId)
          Query the model string of a specified host CPU.
 java.lang.Boolean getProcessorFeature(ProcessorFeature feature)
          Query whether a CPU feature is supported or not.
 java.lang.Long getProcessorOnlineCoreCount()
          Number of physical processor cores online in the host system.
 java.lang.Long getProcessorOnlineCount()
          Number of (logical) CPUs online in the host system.
 java.lang.Long getProcessorSpeed(java.lang.Long cpuId)
          Query the (approximate) maximum speed of a specified host CPU in Megahertz.
 java.util.List<java.lang.String> getSearchStrings()
          Search string registered for name resolving.
 java.util.List<IHostUSBDeviceFilter> getUSBDeviceFilters()
          List of USB device filters in action.
 java.util.List<IHostUSBDevice> getUSBDevices()
          List of USB devices currently attached to the host.
 java.lang.Long getUTCTime()
          Returns the current host time in milliseconds since 1970-01-01 UTC.
 java.util.List<IHostVideoInputDevice> getVideoInputDevices()
          List of currently available host video capture devices.
 void insertUSBDeviceFilter(java.lang.Long position, IHostUSBDeviceFilter filter)
          Inserts the given USB device to the specified position in the list of filters.
static IHost queryInterface(IUnknown obj)
           
 IProgress removeHostOnlyNetworkInterface(java.lang.String id)
          Removes the given Host Only Networking interface.
 void removeUSBDeviceFilter(java.lang.Long position)
          Removes a USB device filter from the specified position in the list of filters.
 
Methods inherited from class org.virtualbox_4_3.IUnknown
getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IHost

public IHost(java.lang.String wrapped,
             org.virtualbox_4_3.jaxws.VboxPortType port)
Method Detail

getDVDDrives

public java.util.List<IMedium> getDVDDrives()
List of DVD drives available on the host.

Returns:
List

getFloppyDrives

public java.util.List<IMedium> getFloppyDrives()
List of floppy drives available on the host.

Returns:
List

getUSBDevices

public java.util.List<IHostUSBDevice> getUSBDevices()
List of USB devices currently attached to the host. Once a new device is physically attached to the host computer, it appears in this list and remains there until detached. NOTE: If USB functionality is not available in the given edition of VirtualBox, this method will set the result code to E_NOTIMPL.

Returns:
List

getUSBDeviceFilters

public java.util.List<IHostUSBDeviceFilter> getUSBDeviceFilters()
List of USB device filters in action. When a new device is physically attached to the host computer, filters from this list are applied to it (in order they are stored in the list). The first matched filter will determine the IHostUSBDeviceFilter.getAction()performed on the device. Unless the device is ignored by these filters, filters of all currently running virtual machines IUSBDeviceFilters.getDeviceFilters()) are applied to it. NOTE: If USB functionality is not available in the given edition of VirtualBox, this method will set the result code to E_NOTIMPL.

Returns:
List
See Also:
IHostUSBDeviceFilter, USBDeviceState

getNetworkInterfaces

public java.util.List<IHostNetworkInterface> getNetworkInterfaces()
List of host network interfaces currently defined on the host.

Returns:
List

getNameServers

public java.util.List<java.lang.String> getNameServers()
The list of nameservers registered in host's name resolving system.

Returns:
List

getDomainName

public java.lang.String getDomainName()
Domain name used for name resolving.

Returns:
String

getSearchStrings

public java.util.List<java.lang.String> getSearchStrings()
Search string registered for name resolving.

Returns:
List

getProcessorCount

public java.lang.Long getProcessorCount()
Number of (logical) CPUs installed in the host system.

Returns:
Long

getProcessorOnlineCount

public java.lang.Long getProcessorOnlineCount()
Number of (logical) CPUs online in the host system.

Returns:
Long

getProcessorCoreCount

public java.lang.Long getProcessorCoreCount()
Number of physical processor cores installed in the host system.

Returns:
Long

getProcessorOnlineCoreCount

public java.lang.Long getProcessorOnlineCoreCount()
Number of physical processor cores online in the host system.

Returns:
Long

getMemorySize

public java.lang.Long getMemorySize()
Amount of system memory in megabytes installed in the host system.

Returns:
Long

getMemoryAvailable

public java.lang.Long getMemoryAvailable()
Available system memory in the host system.

Returns:
Long

getOperatingSystem

public java.lang.String getOperatingSystem()
Name of the host system's operating system.

Returns:
String

getOSVersion

public java.lang.String getOSVersion()
Host operating system's version string.

Returns:
String

getUTCTime

public java.lang.Long getUTCTime()
Returns the current host time in milliseconds since 1970-01-01 UTC.

Returns:
Long

getAcceleration3DAvailable

public java.lang.Boolean getAcceleration3DAvailable()
Returns true when the host supports 3D hardware acceleration.

Returns:
Boolean

getVideoInputDevices

public java.util.List<IHostVideoInputDevice> getVideoInputDevices()
List of currently available host video capture devices.

Returns:
List

queryInterface

public static IHost queryInterface(IUnknown obj)

getProcessorSpeed

public java.lang.Long getProcessorSpeed(java.lang.Long cpuId)
Query the (approximate) maximum speed of a specified host CPU in Megahertz.

Parameters:
cpuId - Identifier of the CPU.
Returns:
Speed value. 0 is returned if value is not known or cpuId is invalid.

getProcessorFeature

public java.lang.Boolean getProcessorFeature(ProcessorFeature feature)
Query whether a CPU feature is supported or not.

Parameters:
feature - CPU Feature identifier.
Returns:
Feature is supported or not.

getProcessorDescription

public java.lang.String getProcessorDescription(java.lang.Long cpuId)
Query the model string of a specified host CPU.

Parameters:
cpuId - Identifier of the CPU.
Returns:
Model string. An empty string is returned if value is not known or cpuId is invalid. NOTE: The current implementation might not necessarily return the description for this exact CPU.

getProcessorCPUIDLeaf

public void getProcessorCPUIDLeaf(java.lang.Long cpuId,
                                  java.lang.Long leaf,
                                  java.lang.Long subLeaf,
                                  Holder<java.lang.Long> valEax,
                                  Holder<java.lang.Long> valEbx,
                                  Holder<java.lang.Long> valEcx,
                                  Holder<java.lang.Long> valEdx)
Returns the CPU cpuid information for the specified leaf.

Parameters:
cpuId - Identifier of the CPU. The CPU most be online.
leaf - CPUID leaf index (eax).
subLeaf - CPUID leaf sub index (ecx). This currently only applies to cache information on Intel CPUs. Use 0 if retrieving values for IMachine.setCPUIDLeaf(Long,Long,Long,Long,Long).
valEax - CPUID leaf value for register eax.
valEbx - CPUID leaf value for register ebx.
valEcx - CPUID leaf value for register ecx.
valEdx - CPUID leaf value for register edx. NOTE: The current implementation might not necessarily return the description for this exact CPU.

createHostOnlyNetworkInterface

public IProgress createHostOnlyNetworkInterface(Holder<IHostNetworkInterface> hostInterface)
Creates a new adapter for Host Only Networking.

Parameters:
hostInterface - Created host interface object.
Returns:
Progress object to track the operation completion. Expected result codes:
E_INVALIDARGHost network interface name already exists.

removeHostOnlyNetworkInterface

public IProgress removeHostOnlyNetworkInterface(java.lang.String id)
Removes the given Host Only Networking interface.

Parameters:
id - Adapter GUID.
Returns:
Progress object to track the operation completion. Expected result codes:
@link ::VBOX_E_OBJECT_NOT_FOUND VBOX_E_OBJECT_NOT_FOUNDNo host network interface matching id found.

createUSBDeviceFilter

public IHostUSBDeviceFilter createUSBDeviceFilter(java.lang.String name)
Creates a new USB device filter. All attributes except the filter name are set to empty (any match), activeis false (the filter is not active). The created filter can be added to the list of filters using insertUSBDeviceFilter(Long,org.virtualbox_4_3.IHostUSBDeviceFilter).

Parameters:
name - Filter name. See IUSBDeviceFilter.getName()for more information.
Returns:
Created filter object.
See Also:
getUSBDeviceFilters()

insertUSBDeviceFilter

public void insertUSBDeviceFilter(java.lang.Long position,
                                  IHostUSBDeviceFilter filter)
Inserts the given USB device to the specified position in the list of filters. Positions are numbered starting from 0. If the specified position is equal to or greater than the number of elements in the list, the filter is added at the end of the collection.

Parameters:
position - Position to insert the filter to.
filter - USB device filter to insert. Expected result codes:
@link ::VBOX_E_INVALID_OBJECT_STATE VBOX_E_INVALID_OBJECT_STATEUSB device filter is not created within this VirtualBox instance.
E_INVALIDARGUSB device filter already in list.
NOTE: Duplicates are not allowed, so an attempt to insert a filter already in the list is an error. NOTE: If USB functionality is not available in the given edition of VirtualBox, this method will set the result code to E_NOTIMPL.
See Also:
getUSBDeviceFilters()

removeUSBDeviceFilter

public void removeUSBDeviceFilter(java.lang.Long position)
Removes a USB device filter from the specified position in the list of filters. Positions are numbered starting from 0. Specifying a position equal to or greater than the number of elements in the list will produce an error.

Parameters:
position - Position to remove the filter from. Expected result codes:
E_INVALIDARGUSB device filter list empty or invalid position.
NOTE: If USB functionality is not available in the given edition of VirtualBox, this method will set the result code to E_NOTIMPL.
See Also:
getUSBDeviceFilters()

findHostDVDDrive

public IMedium findHostDVDDrive(java.lang.String name)
Searches for a host DVD drive with the given name.

Parameters:
name - Name of the host drive to search for
Returns:
Found host drive object Expected result codes:
@link ::VBOX_E_OBJECT_NOT_FOUND VBOX_E_OBJECT_NOT_FOUNDGiven name does not correspond to any host drive.

findHostFloppyDrive

public IMedium findHostFloppyDrive(java.lang.String name)
Searches for a host floppy drive with the given name.

Parameters:
name - Name of the host floppy drive to search for
Returns:
Found host floppy drive object Expected result codes:
@link ::VBOX_E_OBJECT_NOT_FOUND VBOX_E_OBJECT_NOT_FOUNDGiven name does not correspond to any host floppy drive.

findHostNetworkInterfaceByName

public IHostNetworkInterface findHostNetworkInterfaceByName(java.lang.String name)
Searches through all host network interfaces for an interface with the given name.

Parameters:
name - Name of the host network interface to search for.
Returns:
Found host network interface object. NOTE: The method returns an error if the given name does not correspond to any host network interface.

findHostNetworkInterfaceById

public IHostNetworkInterface findHostNetworkInterfaceById(java.lang.String id)
Searches through all host network interfaces for an interface with the given GUID.

Parameters:
id - GUID of the host network interface to search for.
Returns:
Found host network interface object. NOTE: The method returns an error if the given GUID does not correspond to any host network interface.

findHostNetworkInterfacesOfType

public java.util.List<IHostNetworkInterface> findHostNetworkInterfacesOfType(HostNetworkInterfaceType type)
Searches through all host network interfaces and returns a list of interfaces of the specified type

Parameters:
type - type of the host network interfaces to search for.
Returns:
Found host network interface objects.

findUSBDeviceById

public IHostUSBDevice findUSBDeviceById(java.lang.String id)
Searches for a USB device with the given UUID.

Parameters:
id - UUID of the USB device to search for.
Returns:
Found USB device object. Expected result codes:
@link ::VBOX_E_OBJECT_NOT_FOUND VBOX_E_OBJECT_NOT_FOUNDGiven id does not correspond to any USB device.
See Also:
IUSBDevice.getId()

findUSBDeviceByAddress

public IHostUSBDevice findUSBDeviceByAddress(java.lang.String name)
Searches for a USB device with the given host address.

Parameters:
name - Address of the USB device (as assigned by the host) to search for.
Returns:
Found USB device object. Expected result codes:
@link ::VBOX_E_OBJECT_NOT_FOUND VBOX_E_OBJECT_NOT_FOUNDGiven name does not correspond to any USB device.
See Also:
IUSBDevice.getAddress()

generateMACAddress

public java.lang.String generateMACAddress()
Generates a valid Ethernet MAC address, 12 hexadecimal characters.

Returns:
New Ethernet MAC address.