All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sun.xml.ws.commons.virtualbox.IVirtualBox Maven / Gradle / Ivy


package com.sun.xml.ws.commons.virtualbox;

import java.util.List;
import java.util.UUID;
import javax.xml.ws.Holder;
import javax.xml.ws.WebServiceException;


/**
 * The IVirtualBox interface represents the main interface exposed by the
 *       product that provides virtual machine management.
 * 
 *       An instance of IVirtualBox is required for the product to do anything
 *       useful. Even though the interface does not expose this, internally,
 *       IVirtualBox is implemented as a singleton and actually lives in the
 *       process of the VirtualBox server (VBoxSVC.exe). This makes sure that
 *       IVirtualBox can track the state of all virtual machines on a particular
 *       host, regardless of which frontend started them.
 * 
 *       To enumerate all the virtual machines on the host, use the {@link IVirtualBox#machines} attribute.
 * 
 */
public class IVirtualBox {

    public final VboxPortType port;
    public final String _this;

    public IVirtualBox(String _this, VboxPortType port) {
        
        this._this = _this;
        this.port = port;
    
    }

    /**
     * A string representing the version number of the product. The
     *         format is 3 integer numbers divided by dots (e.g. 1.0.1). The
     *         last number represents the build number and will frequently change.
     * 
     */
    public String getVersion() {
        try {
            String retVal = port.iVirtualBoxGetVersion(_this);
            return retVal;
        } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /**
     * The internal build revision number of the product.
     * 
     */
    public long getRevision() {
        try {
            long retVal = port.iVirtualBoxGetRevision(_this);
            return retVal;
        } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /**
     * A string representing the package type of this product. The
     *         format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
     *         SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
     *         is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
     *         this.
     * 
     */
    public String getPackageType() {
        try {
            String retVal = port.iVirtualBoxGetPackageType(_this);
            return retVal;
        } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /**
     * Full path to the directory where the global settings file, VirtualBox.xml, is stored.
     * 
     *         In this version of VirtualBox, the value of this property is
     *         always<user_dir>/.VirtualBox(where<user_dir>is the path to the user directory,
     *         as determined by the host OS), and cannot be changed.
     * 
     *         This path is also used as the base to resolve relative paths in
     *         places where relative paths are allowed (unless otherwise
     *         expressly indicated).
     * 
     */
    public String getHomeFolder() {
        try {
            String retVal = port.iVirtualBoxGetHomeFolder(_this);
            return retVal;
        } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /**
     * Full name of the global settings file.
     *         The value of this property corresponds to the value of {@link #homeFolder} plus/VirtualBox.xml.
     * 
     */
    public String getSettingsFilePath() {
        try {
            String retVal = port.iVirtualBoxGetSettingsFilePath(_this);
            return retVal;
        } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) {
            throw new WebServiceException(e);
        } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) {
            throw new WebServiceException(e);
        }
    }

    /**
     * Current version of the format of the global VirtualBox settings file
     *         (VirtualBox.xml).
     * 
     *         The version string has the following format:
x.y-platform
wherexandyare the major and the minor format * versions, andplatformis the platform identifier. * * The current version usually matches the value of the {@link #settingsFormatVersion} attribute unless the * settings file was created by an older version of VirtualBox and there * was a change of the settings file format since then. * * Note that VirtualBox automatically converts settings files from older * versions to the most recent version when reading them (usually at * VirtualBox startup) but it doesn't save the changes back until * you call a method that implicitly saves settings (such as {@link #setExtraData}) or call {@link #saveSettings} explicitly. Therefore, if the value of this attribute differs from the * value of {@link #settingsFormatVersion}, then it * means that the settings file was converted but the result of the * conversion is not yet saved to disk. * * The above feature may be used by interactive front-ends to inform users * about the settings file format change and offer them to explicitly save * all converted settings files (the global and VM-specific ones), * optionally create backup copies of the old settings files before saving, * etc. * @see settingsFormatVersion, saveSettingsWithBackup() * */ public String getSettingsFileVersion() { try { String retVal = port.iVirtualBoxGetSettingsFileVersion(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Most recent version of the settings file format. * * The version string has the following format:
x.y-platform
wherexandyare the major and the minor format * versions, andplatformis the platform identifier. * * VirtualBox uses this version of the format when saving settings files * (either as a result of method calls that require to save settings or as * a result of an explicit call to {@link #saveSettings}). * @see settingsFileVersion * */ public String getSettingsFormatVersion() { try { String retVal = port.iVirtualBoxGetSettingsFormatVersion(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Associated host object. * */ public IHost getHost() { try { String retVal = port.iVirtualBoxGetHost(_this); return new IHost(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Associated system information object. * */ public ISystemProperties getSystemProperties() { try { String retVal = port.iVirtualBoxGetSystemProperties(_this); return new ISystemProperties(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Array of machine objects registered within this VirtualBox instance. * */ public List getMachines() { try { List retVal = port.iVirtualBoxGetMachines(_this); return Helper.wrap(IMachine.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Array of hard disk objects known to this VirtualBox installation. * * This array contains only base (root) hard disks. All differencing * hard disks of the given base hard disk can be enumerated using {@link IHardDisk#children}. * */ public List getHardDisks() { try { List retVal = port.iVirtualBoxGetHardDisks(_this); return Helper.wrap(IHardDisk.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Array of CD/DVD image objects registered with this VirtualBox instance. * */ public List getDVDImages() { try { List retVal = port.iVirtualBoxGetDVDImages(_this); return Helper.wrap(IDVDImage.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Array of floppy image objects registered with this VirtualBox instance. * */ public List getFloppyImages() { try { List retVal = port.iVirtualBoxGetFloppyImages(_this); return Helper.wrap(IFloppyImage.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * */ public List getProgressOperations() { try { List retVal = port.iVirtualBoxGetProgressOperations(_this); return Helper.wrap(IProgress.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * */ public List getGuestOSTypes() { try { List retVal = port.iVirtualBoxGetGuestOSTypes(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Collection of global shared folders. Global shared folders are * available to all virtual machines. * * New shared folders are added to the collection using {@link #createSharedFolder}. Existing shared folders can be * removed using {@link #removeSharedFolder}.
In the current version of the product, global shared folders are not * implemented and therefore this collection is always empty.
* */ public List getSharedFolders() { try { List retVal = port.iVirtualBoxGetSharedFolders(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Associated performance collector object. * */ public IPerformanceCollector getPerformanceCollector() { try { String retVal = port.iVirtualBoxGetPerformanceCollector(_this); return new IPerformanceCollector(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * dhcp server settings. * */ public List getDHCPServers() { try { List retVal = port.iVirtualBoxGetDHCPServers(_this); return Helper.wrap(IDHCPServer.class, port, retVal); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a new virtual machine. * * The new machine is created unregistered, with the initial configuration * set according to the specified guest OS type. A typical sequence of * actions to create a new virtual machine is as follows:
  1. Call this method to have a new machine created. The returned machine * object will be "mutable" allowing to change any machine property.
  2. Configure the machine using the appropriate attributes and methods.
  3. Call {@link IMachine#saveSettings} to write the settings * to the machine's XML settings file. The configuration of the newly * created machine will not be saved to disk until this method is * called.
  4. Call {@link #registerMachine} to add the machine to the list * of machines known to VirtualBox.
You should specify valid name for the newly created machine when calling * this method. See the {@link IMachine#name} attribute description * for more details about the machine name. * * The specified guest OS type identifier must match an ID of one of known * guest OS types listed in the {@link IVirtualBox#guestOSTypes} array. * * Every machine has asettings filethat is used to store * the machine configuration. This file is stored in a directory called themachine settings subfolder. Both the settings subfolder and file * will have a name that corresponds to the name of the virtual machine. * You can specify where to create the machine setting subfolder using the * @a baseFolder argument. The base folder can be absolute (full path) or * relative to the {@link IVirtualBox#homeFolder}. * * If @a baseFolder is a null or empty string (which is recommended), the {@link ISystemProperties#defaultMachineFolder} will be used as a base folder for the created * machine. Otherwise the given base folder will be used. In either case, * the full path to the resulting settings file has the following * structure:
<base_folder>/<machine_name>/<machine_name>.xml
Note that if the resulting settings file already exists, this method * will fail with {@link VBOX_E_FILE_ERROR}. * * Optionally, you may specify an UUID of to assign to the created machine. * However, this is not recommended and you should normally pass an empty * (null) UUID to this method so that a new UUID will be automatically * generated for every created machine. You can use UUID * 00000000-0000-0000-0000-000000000000 as null value.
There is no way to change the name of the settings file or * subfolder of the created machine directly.
@a osTypeId is invalid.Resulting settings file name is invalid or the settings file already * exists or could not be created due to an I/O error.@a name is empty or null. * * @param id * Machine UUID (optional). * @param baseFolder * Base machine folder (optional). * @param name * Machine name. * @param osTypeId * Guest OS Type ID. * @return * Created machine object. */ public IMachine createMachine(String name, String osTypeId, String baseFolder, UUID id) { try { String retVal = port.iVirtualBoxCreateMachine(_this, name, osTypeId, baseFolder, id.toString()); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a new virtual machine in "legacy" mode, using the specified * settings file to store machine settings. * * As opposed to machines created by {@link #createMachine}, * the settings file of the machine created in "legacy" mode is not * automatically renamed when the machine name is changed -- it will always * remain the same as specified in this method call. * * The specified settings file name can be absolute (full path) or relative * to the {@link IVirtualBox#homeFolder}. If the file name doesn't contain an extension, the * default extension (.xml) will be appended. * * Note that the configuration of the newly created machine is not * saved to disk (and therefore no settings file is created) * until {@link IMachine#saveSettings} is called. If the * specified settings file already exists, this method * will fail with {@link VBOX_E_FILE_ERROR}. * * See {@link #createMachine} for more information. * * @deprecated This method may be removed later. Use {@link IVirtualBox#createMachine} instead.
There is no way to change the name of the settings file * of the machine created in "legacy" mode.
@a osTypeId is invalid.@a settingsFile is invalid or the settings file already exists or * could not be created due to an I/O error.@a name or @a settingsFile is empty or null. * * @param id * Machine UUID (optional). * @param name * Machine name. * @param settingsFile * Name of the machine settings file. * @param osTypeId * Machine OS Type ID. * @return * Created machine object. */ public IMachine createLegacyMachine(String name, String osTypeId, String settingsFile, UUID id) { try { String retVal = port.iVirtualBoxCreateLegacyMachine(_this, name, osTypeId, settingsFile, id.toString()); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a virtual machine from the existing settings file. * The opened machine remains unregistered until you call {@link #registerMachine}. * * The specified settings file name can be absolute * (full path) or relative to the {@link IVirtualBox#homeFolder}. This file must exist * and must be a valid machine settings file whose contents * will be used to construct the machine object. * * @deprecated Will be removed soon.Settings file name invalid, not found or sharing violation. * * @param settingsFile * Name of the machine settings file. * @return * Opened machine object. */ public IMachine openMachine(String settingsFile) { try { String retVal = port.iVirtualBoxOpenMachine(_this, settingsFile); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Registers the machine previously created using {@link #createMachine} or opened using {@link #openMachine} within this VirtualBox installation. After * successful method invocation, the {@link IVirtualBoxCallback#onMachineRegistered} signal is sent * to all registered callbacks.
This method implicitly calls {@link IMachine#saveSettings} to save all current machine settings before registering it.
No matching virtual machine found.Virtual machine was not created within this VirtualBox instance. * * @param machine * */ public void registerMachine(IMachine machine) { try { port.iVirtualBoxRegisterMachine(_this, ((machine == null)?null:machine._this)); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Attempts to find a virtual machine given its UUID. * To look up a machine by name, use {@link IVirtualBox#findMachine} instead.Could not find registered machine matching @a id. * * @param id * * @return * */ public IMachine getMachine(UUID id) { try { String retVal = port.iVirtualBoxGetMachine(_this, id.toString()); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Attempts to find a virtual machine given its name. * To look up a machine by UUID, use {@link IVirtualBox#getMachine} instead.Could not find registered machine matching @a name. * * @param name * * @return * */ public IMachine findMachine(String name) { try { String retVal = port.iVirtualBoxFindMachine(_this, name); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Unregisters the machine previously registered using {@link #registerMachine}. After successful method invocation, the {@link IVirtualBoxCallback#onMachineRegistered} signal is sent * to all registered callbacks.
The specified machine must not be in the Saved state, have an open * (or a spawning) direct session associated with it, have snapshots or * have hard disks attached.
This method implicitly calls {@link IMachine#saveSettings} to * save all current machine settings before unregistering it.
If the given machine is inaccessible (see {@link IMachine#accessible}), it will be unregistered and * fully uninitialized right afterwards. As a result, the returned * machine object will be unusable and an attempt to callanymethod will return the "Object not ready" error.
Could not find registered machine matching @a id.Machine is in Saved state.Machine has snapshot or open session or hard disk attached. * * @param id * UUID of the machine to unregister. * @return * Unregistered machine object. */ public IMachine unregisterMachine(UUID id) { try { String retVal = port.iVirtualBoxUnregisterMachine(_this, id.toString()); return new IMachine(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a new appliance object, which represents an appliance in the Open Virtual Machine * Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export * machines as an OVF appliance; see the documentation for {@link IAppliance} for details. * * @return * New appliance. */ public IAppliance createAppliance() { try { String retVal = port.iVirtualBoxCreateAppliance(_this); return new IAppliance(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a new base hard disk object that will use the given storage * format and location for hard disk data. * * Note that the actual storage unit is not created by this method. In * order to do it, and before you are able to attach the created hard disk * to virtual machines, you must call one of the following methods to * allocate a format-specific storage unit at the specified location:
  • {@link IHardDisk#createBaseStorage}
  • {@link IHardDisk#createDiffStorage}
Some hard disk attributes, such as {@link IHardDisk#id}, may * remain uninitialized until the hard disk storage unit is successfully * created by one of the above methods. * * After the storage unit is successfully created, the hard disk gets * remembered by this VirtualBox installation and will be accessible * through {@link #getHardDisk} and {@link #findHardDisk} methods. Remembered root (base) hard disks are also returned as part of * the {@link #hardDisks} array. See IHardDisk for more details. * * The list of all storage formats supported by this VirtualBox * installation can be obtained using {@link ISystemProperties#hardDiskFormats}. If the @a format * attribute is empty ornullthen the default storage format * specified by {@link ISystemProperties#defaultHardDiskFormat} will * be used for creating a storage unit of the hard disk. * * Note that the format of the location string is storage format specific. * See {@link IMedium#location}, IHardDisk and {@link ISystemProperties#defaultHardDiskFolder} for more details.@a format identifier is invalid. See {@link ISystemProperties#hardDiskFormats}.@a location is a not valid file name (for file-based formats only).@a format is a null or empty string. * * @param location * Location of the storage unit for the new hard disk. * @param format * Identifier of the storage format to use for the new hard disk. * @return * Created hard disk object. */ public IHardDisk createHardDisk(String format, String location) { try { String retVal = port.iVirtualBoxCreateHardDisk(_this, format, location); return new IHardDisk(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a hard disk from an existing location. * * After the hard disk is successfully opened by this method, it gets * remembered by (known to) this VirtualBox installation and will be * accessible through {@link #getHardDisk} and {@link #findHardDisk} methods. Remembered root (base) hard disks * are also returned as part of the {@link #hardDisks} array and can * be attached to virtual machines. See IHardDisk for more details. * * If a differencing hard disk is to be opened by this method, the * operation will succeed only if its parent hard disk and all ancestors, * if any, are already known to this VirtualBox installation (for example, * were opened by this method before). * * This method tries to guess the storage format of the specified hard disk * by reading hard disk data at the specified location. * * If @a write is ReadWrite (which it should be), the image is opened for * read/write access and must have according permissions, as VirtualBox * may actually write status information into the disk's metadata sections. * * Note that write access is required for all typical image usage in VirtualBox, * since VirtualBox may need to write metadata such as a UUID into the image. * The only exception is opening a source image temporarily for copying and * cloning when the image will quickly be closed again. * * Note that the format of the location string is storage format specific. * See {@link IMedium#location}, IHardDisk and {@link ISystemProperties#defaultHardDiskFolder} for more details.Invalid hard disk storage file location or could not find the hard * disk at the specified location.Could not get hard disk storage format.Invalid hard disk storage format. * * @param accessMode * Determines whether to open the image in read/write or read-only mode. * @param location * Location of the storage unit that contains hard disk data in one of * the supported storage formats. * @return * Opened hard disk object. */ public IHardDisk openHardDisk(String location, AccessMode accessMode) { try { String retVal = port.iVirtualBoxOpenHardDisk(_this, location, accessMode); return new IHardDisk(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a hard disk with the given UUID. * * The hard disk with the given UUID must be known to this VirtualBox * installation, i.e. it must be previously created by {@link #createHardDisk} or opened by {@link #openHardDisk}, or attached to some known virtual machine.No hard disk object matching @a id found. * * @param id * UUID of the hard disk to look for. * @return * Found hard disk object. */ public IHardDisk getHardDisk(UUID id) { try { String retVal = port.iVirtualBoxGetHardDisk(_this, id.toString()); return new IHardDisk(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a hard disk that uses the given location to store hard * disk data. * * The given hard disk must be known to this VirtualBox installation, i.e. * it must be previously created by {@link #createHardDisk} or opened by {@link #openHardDisk}, or attached to some known virtual machine. * * The search is done by comparing the value of the @a location argument to * the {@link IHardDisk#location} attribute of each known hard * disk. * * For locations represented by file names in the host's file system, the * requested location can be a path relative to the {@link IVirtualBox#homeFolder}. If * only a file name without any path is given, the {@link ISystemProperties#defaultHardDiskFolder} will be prepended to the file name before searching. Note * that on case sensitive file systems, a case sensitive comparison is * performed, otherwise the case of symbols in the file path is ignored.No hard disk object matching @a location found. * * @param location * Location string to search for. * @return * Found hard disk object. */ public IHardDisk findHardDisk(String location) { try { String retVal = port.iVirtualBoxFindHardDisk(_this, location); return new IHardDisk(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a CD/DVD image contained in the specified file of the supported * format and assigns it the given UUID. * * After the image is successfully opened by this method, it gets * remembered by (known to) this VirtualBox installation and will be * accessible through {@link #getDVDImage} and {@link #findDVDImage} methods. Remembered images are also * returned as part of the {@link #DVDImages} array and can be mounted * to virtual machines. See IMedium for more details. * * See {@link IMedium#location} to get more details about the format * of the location string.
Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
Invalid CD/DVD image file location or could not find the CD/DVD * image at the specified location.CD/DVD image already exists in the media registry. * * @param id * UUID to assign to the given image within this VirtualBox installation. * If an empty (null) UUID is specified, the system will randomly * generate a new UUID. * @param location * Full path to the file that contains a valid CD/DVD image. * @return * Opened CD/DVD image object. */ public IDVDImage openDVDImage(String location, UUID id) { try { String retVal = port.iVirtualBoxOpenDVDImage(_this, location, id.toString()); return new IDVDImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a CD/DVD image with the given UUID. * * The image with the given UUID must be known to this VirtualBox * installation, i.e. it must be previously opened by {@link #openDVDImage}, or mounted to some known virtual machine.No matching DVD image found in the media registry. * * @param id * UUID of the image to look for. * @return * Found CD/DVD image object. */ public IDVDImage getDVDImage(UUID id) { try { String retVal = port.iVirtualBoxGetDVDImage(_this, id.toString()); return new IDVDImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a CD/DVD image with the given image location. * * The image with the given UUID must be known to this VirtualBox * installation, i.e. it must be previously opened by {@link #openDVDImage}, or mounted to some known virtual machine. * * The search is done by comparing the value of the @a location argument to * the {@link IMedium#location} attribute of each known CD/DVD image. * * The requested location can be a path relative to the {@link IVirtualBox#homeFolder}. If * only a file name without any path is given, the {@link ISystemProperties#defaultHardDiskFolder} will be prepended to the file name before searching. Note * that on case sensitive file systems, a case sensitive comparison is * performed, otherwise the case in the file path is ignored.Invalid image file location.No matching DVD image found in the media registry. * * @param location * CD/DVD image file path to look for. * @return * Found CD/DVD image object. */ public IDVDImage findDVDImage(String location) { try { String retVal = port.iVirtualBoxFindDVDImage(_this, location); return new IDVDImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a floppy image contained in the specified file of the supported * format and assigns it the given UUID. * * After the image is successfully opened by this method, it gets * remembered by (known to) this VirtualBox installation and will be * accessible through {@link #getFloppyImage} and {@link #findFloppyImage} methods. Remembered images are also * returned as part of the {@link #floppyImages} array and can be * mounted to virtual machines. See IMedium for more details. * * See {@link IMedium#location} to get more details about the format * of the location string.Invalid floppy image file location or could not find the floppy * image at the specified location.Floppy image already exists in the media registry.
Currently, only raw floppy images are supported by VirtualBox.
* * @param id * UUID to assign to the given image file within this VirtualBox * installation. If an empty (null) UUID is specified, the system will * randomly generate a new UUID. * @param location * Full path to the file that contains a valid floppy image. * @return * Opened floppy image object. */ public IFloppyImage openFloppyImage(String location, UUID id) { try { String retVal = port.iVirtualBoxOpenFloppyImage(_this, location, id.toString()); return new IFloppyImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a floppy image with the given UUID. * * The image with the given UUID must be known to this VirtualBox * installation, i.e. it must be previously opened by {@link #openFloppyImage}, or mounted to some known virtual machine.No matching floppy image found in the media registry. * * @param id * UUID of the image to look for. * @return * Found floppy image object. */ public IFloppyImage getFloppyImage(UUID id) { try { String retVal = port.iVirtualBoxGetFloppyImage(_this, id.toString()); return new IFloppyImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a floppy image with the given image location. * * The image with the given UUID must be known to this VirtualBox * installation, i.e. it must be previously opened by {@link #openFloppyImage}, or mounted to some known virtual machine. * * The search is done by comparing the value of the @a location argument to * the {@link IMedium#location} attribute of each known floppy image. * * The requested location can be a path relative to the {@link IVirtualBox#homeFolder}. If * only a file name without any path is given, the {@link ISystemProperties#defaultHardDiskFolder} will be prepended to the file name before searching. Note * that on case sensitive file systems, a case sensitive comparison is * performed, otherwise the case of symbols in the file path is ignored.Invalid image file location.No matching floppy image found in the media registry. * * @param location * Floppy image file path to look for. * @return * Found floppy image object. */ public IFloppyImage findFloppyImage(String location) { try { String retVal = port.iVirtualBoxFindFloppyImage(_this, location); return new IFloppyImage(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns an object describing the specified guest OS type. * * The requested guest OS type is specified using a string which is a * mnemonic identifier of the guest operating system, such as"win31"or"ubuntu". The guest OS type ID of a * particular virtual machine can be read or set using the {@link IMachine#OSTypeId} attribute. * * The {@link IVirtualBox#guestOSTypes} collection contains all * available guest OS type objects. Each object has an {@link IGuestOSType#id} attribute which contains an identifier of * the guest OS this object describes.@a id is not a valid Guest OS type. * * @param id * Guest OS type ID string. * @return * Guest OS type object. */ public IGuestOSType getGuestOSType(String id) { try { IGuestOSType retVal = port.iVirtualBoxGetGuestOSType(_this, id); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a new global shared folder by associating the given logical * name with the given host path, adds it to the collection of shared * folders and starts sharing it. Refer to the description of {@link ISharedFolder} to read more about logical names.
In the current implementation, this operation is not * implemented.
* * @param writable * Whether the share is writable or readonly * @param name * Unique logical name of the shared folder. * @param hostPath * Full path to the shared folder in the host file system. */ public void createSharedFolder(String name, String hostPath, boolean writable) { try { port.iVirtualBoxCreateSharedFolder(_this, name, hostPath, writable); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Removes the global shared folder with the given name previously * created by {@link #createSharedFolder} from the collection of * shared folders and stops sharing it.
In the current implementation, this operation is not * implemented.
* * @param name * Logical name of the shared folder to remove. */ public void removeSharedFolder(String name) { try { port.iVirtualBoxRemoveSharedFolder(_this, name); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns the global extra data key name following the supplied key. * * An error is returned if the supplied @a key does not exist. @c NULL is * returned in @a nextKey if the supplied key is the last key. When * supplying @c NULL or an empty string for the @a key, the first key item * is returned in @a nextKey (if there is any). @a nextValue is an optional * parameter and if supplied, the next key's value is returned in it.Extra data @a key not found. * * @param nextKey * Name of the next data key. * @param nextValue * Value of the next data key. * @param key * Name of the data key to follow. */ public void getNextExtraDataKey(String key, Holder nextKey, Holder nextValue) { try { port.iVirtualBoxGetNextExtraDataKey(_this, key, nextKey, nextValue); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns associated global extra data. * * If the requested data @a key does not exist, this function will * succeed and return @c NULL in the @a value argument.Settings file not accessible.Could not parse the settings file. * * @param key * Name of the data key to get. * @return * Value of the requested data key. */ public String getExtraData(String key) { try { String retVal = port.iVirtualBoxGetExtraData(_this, key); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Sets associated global extra data. * * If you pass @c NULL as a key @a value, the given @a key will be * deleted.
Before performing the actual data change, this method will ask all * registered callbacks using the {@link IVirtualBoxCallback#onExtraDataCanChange} notification for a permission. If one of the callbacks refuses the * new value, the change will not be performed.
On success, the {@link IVirtualBoxCallback#onExtraDataChange} notification * is called to inform all registered callbacks about a successful data * change.
Settings file not accessible.Could not parse the settings file.Modification request refused. * * @param value * Value to assign to the key. * @param key * Name of the data key to set. */ public void setExtraData(String key, String value) { try { port.iVirtualBoxSetExtraData(_this, key, value); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a new direct session with the given virtual machine. * * A direct session acts as a local lock on the given VM. * There can be only one direct session open at a time for every * virtual machine, protecting the VM from being manipulated by * conflicting actions from different processes. Only after a * direct session has been opened, one can change all VM settings * and execute the VM in the process space of the session object. * * Sessions therefore can be compared to mutex semaphores that * lock a given VM for modification and execution. * See {@link ISession} for details.
Unless you are writing a new VM frontend, you will not * want to execute a VM in the current process. To spawn a new * process that executes a VM, use {@link IVirtualBox#openRemoteSession} instead.
Upon successful return, the session object can be used to * get access to the machine and to the VM console. * * In VirtualBox terminology, the machine becomes "mutable" after * a session has been opened. Note that the "mutable" machine * object, on which you may invoke IMachine methods to change its * settings, will be a different object from the immutable IMachine * objects returned by various IVirtualBox methods. To obtain a * mutable IMachine object (upon which you can invoke settings methods), * use the {@link ISession#machine} attribute. * * One must always call {@link ISession#close} to release the * lock on the machine, or the machine's state will eventually be * set to "Aborted". * * In other words, to change settings on a machine, the following * sequence is typically performed:
  1. Call this method (openSession) to have a machine locked for * the current session.
  2. Obtain a mutable IMachine object from {@link ISession#machine}.
  3. Change the settings of the machine.
  4. Call {@link IMachine#saveSettings}.
  5. Close the session by calling {@link ISession#close}.
Virtual machine not registered.Process not started by OpenRemoteSession.No matching virtual machine found.Session already open or being opened.Failed to assign machine to session. * * @param session * Session object that will represent the opened session after * successful method invocation. This object must not represent * the already open session. * @param machineId * ID of the virtual machine to open a session with. */ public void openSession(ISession session, UUID machineId) { try { port.iVirtualBoxOpenSession(_this, ((session == null)?null:session._this), machineId.toString()); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Spawns a new process that executes a virtual machine (called a * "remote session"). * * Opening a remote session causes the VirtualBox server to start a new * process that opens a direct session with the given VM. As a result, the * VM is locked by that direct session in the new process, preventing * conflicting changes from other processes. Since sessions act as locks * that prevent conflicting changes, one cannot open a remote session * for a VM that already has another open session (direct or remote), or * is currently in the process of opening one (see {@link IMachine#sessionState}). * * While the remote session still provides some level of control over the * VM execution to the caller (using the {@link IConsole} interface), * not all VM settings are available for modification within the remote * session context. * * This operation can take some time (a new VM is started in a new process, * for which memory and other resources need to be set up). Because of this, * an {@link IProgress} is returned to allow the caller to wait for this * asynchronous operation to be completed. Until then, the remote session * object remains in the closed state, and accessing the machine or its * console through it is invalid. It is recommended to use {@link IProgress#waitForCompletion} or similar calls to wait for * completion. * * As with all {@link ISession} objects, it is recommended to call {@link ISession#close} on the local session object once openRemoteSession() * has been called. However, the session's state (see {@link ISession#state}) * will not return to "Closed" until the remote session has also closed (i.e. * until the VM is no longer running). In that case, however, the state of * the session will automatically change back to "Closed". * * Currently supported session types (values of the @a type * argument) are:
  • gui: VirtualBox Qt GUI session
  • vrdp: VirtualBox VRDP Server session
The @a environment argument is a string containing definitions of * environment variables in the following format: * @code * NAME[=VALUE]\n * NAME[=VALUE]\n * ... * @endcode * where\\nis the new line character. These environment * variables will be appended to the environment of the VirtualBox server * process. If an environment variable exists both in the server process * and in this list, the value from this list takes precedence over the * server's variable. If the value of the environment variable is * omitted, this variable will be removed from the resulting environment. * If the environment string is @c null, the server environment is * inherited by the started process as is. * @see openExistingSessionVirtual machine not registered.Invalid session type @a type.No machine matching @a machineId found.Session already open or being opened.Launching process for machine failed.Failed to assign machine to session. * * @param environment * Environment to pass to the opened session (may be @c null). * @param session * Session object that will represent the opened remote session * after successful method invocation (this object must not * represent an already open session). * @param machineId * ID of the virtual machine to open a session with. * @param type * Type of the remote session (case sensitive). * @return * Progress object to track the operation completion. */ public IProgress openRemoteSession(ISession session, UUID machineId, String type, String environment) { try { String retVal = port.iVirtualBoxOpenRemoteSession(_this, ((session == null)?null:session._this), machineId.toString(), type, environment); return new IProgress(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Opens a new remote session with the virtual machine for * which a direct session is already open. * * The remote session provides some level of control over the VM * execution (using the IConsole interface) to the caller; however, * within the remote session context, not all VM settings are available * for modification. * * As opposed to {@link #openRemoteSession}, the number of * remote sessions opened this way is not limited by the API
It is an error to open a remote session with the machine that * doesn't have an open direct session.
Virtual machine not registered.No machine matching @a machineId found.Session already open or being opened.Direct session state not Open.Failed to get console object from direct session or assign * machine to session. * @see openRemoteSession * * @param session * Session object that will represent the open remote session * after successful method invocation. This object must not * represent an already open session. * @param machineId * ID of the virtual machine to open a session with. */ public void openExistingSession(ISession session, UUID machineId) { try { port.iVirtualBoxOpenExistingSession(_this, ((session == null)?null:session._this), machineId.toString()); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Blocks the caller until any of the properties represented by the * @a what argument changes the value or until the given timeout interval * expires. * * The @a what argument is a comma separated list of property masks that * describe properties the caller is interested in. The property mask is * a string in the following format:
[[group.]subgroup.]name
where @c name is the property name and @c group, @c subgroup are zero * or more property group specifiers. Each element (group or name) in * the property mask may be either a Latin string or an asterisk symbol * (@c "*") which is used to match any string for the given element. A * property mask that doesn't contain asterisk symbols represents a * single fully qualified property name. * * Groups in the fully qualified property name go from more generic (the * left-most part) to more specific (the right-most part). The first * element is usually a name of the object the property belongs to. The * second element may be either a property name, or a child object name, * or an index if the preceding element names an object which is one of * many objects of the same type. This way, property names form a * hierarchy of properties. Here are some examples of property names:
VirtualBox.version{@link IVirtualBox#version} property
Machine.<UUID>.name{@link IMachine#name} property of the machine with the * given UUID
Most property names directly correspond to the properties of objects * (components) provided by the VirtualBox library and may be used to * track changes to these properties. However, there may be * pseudo-property names that don't correspond to any existing object's * property directly, as well as there may be object properties that * don't have a corresponding property name that is understood by this * method, and therefore changes to such properties cannot be * tracked. See individual object's property descriptions to get a * fully qualified property name that can be used with this method (if * any). * * There is a special property mask @c "*" (i.e. a string consisting of a * single asterisk symbol) that can be used to match all properties. * Below are more examples of property masks:
VirtualBox.*Track all properties of the VirtualBox object
Machine.*.nameTrack changes to the {@link IMachine#name} property of * all registered virtual machines
This function is not implemented in the current version of the * product.
* * @param values * Reserved, not currently used. * @param what * Comma separated list of property masks. * @param timeout * Wait timeout in milliseconds. * Specify -1 for an indefinite wait. * @param changed * Comma separated list of properties that have been changed and caused * this method to return to the caller. */ public void waitForPropertyChange(String what, long timeout, Holder changed, Holder values) { try { port.iVirtualBoxWaitForPropertyChange(_this, what, timeout, changed, values); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Saves the global settings to the global settings file * ({@link #settingsFilePath}). * * This method is only useful for explicitly saving the global settings * file after it has been auto-converted from the old format to the most * recent format (see {@link #settingsFileVersion} for details). * Normally, the global settings file is implicitly saved when a global * setting is changed.Settings file not accessible.Could not parse the settings file. * */ public void saveSettings() { try { port.iVirtualBoxSaveSettings(_this); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a backup copy of the global settings file * ({@link IVirtualBox#settingsFilePath}) in case of auto-conversion, * and then calls {@link IVirtualBox#saveSettings}. * * Note that the backup copy is createdonlyif the settings file * auto-conversion took place (see {@link #settingsFileVersion} for * details). Otherwise, this call is fully equivalent to {@link IVirtualBox#saveSettings} and no backup copying is done. * * The backup copy is created in the same directory where the original * settings file is located. It is given the following file name:
original.xml.x.y-platform.bak
whereoriginal.xmlis the original settings file name * (excluding path), andx.y-platformis the version of the old * format of the settings file (before auto-conversion). * * If the given backup file already exists, this method will try to add the.Nsuffix to the backup file name (whereNcounts from * 0 to 9) and copy it again until it succeeds. If all suffixes are * occupied, or if any other copy error occurs, this method will return a * failure. * * If the copy operation succeeds, the @a bakFileName return argument will * receive a full path to the created backup file (for informational * purposes). Note that this will happen even if the subsequent {@link #saveSettings} call performed by this method after the * copy operation, fails.
The VirtualBox API never calls this method. It is intended purely for * the purposes of creating backup copies of the settings files by * front-ends before saving the results of the automatically performed * settings conversion to disk.
* @see settingsFileVersionSettings file not accessible.Could not parse the settings file.Could not copy the settings file. * * @return * Full path to the created backup copy. */ public String saveSettingsWithBackup() { try { String retVal = port.iVirtualBoxSaveSettingsWithBackup(_this); return retVal; } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Creates a dhcp server settings to be used for the given internal network nameHost network interface @a name already exists. * * @param name * server name * @return * Dhcp server settings */ public IDHCPServer createDHCPServer(String name) { try { String retVal = port.iVirtualBoxCreateDHCPServer(_this, name); return new IDHCPServer(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Searches a dhcp server settings to be used for the given internal network nameHost network interface @a name already exists. * * @param name * server name * @return * Dhcp server settings */ public IDHCPServer findDHCPServerByNetworkName(String name) { try { String retVal = port.iVirtualBoxFindDHCPServerByNetworkName(_this, name); return new IDHCPServer(retVal, port); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Removes the dhcp server settingsHost network interface @a name already exists. * * @param server * Dhcp server settings to be removed */ public void removeDHCPServer(IDHCPServer server) { try { port.iVirtualBoxRemoveDHCPServer(_this, ((server == null)?null:server._this)); } catch (com.sun.xml.ws.commons.virtualbox.InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (com.sun.xml.ws.commons.virtualbox.RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Returns a managed object reference to the internal ISession object that was created * for this web service session when the client logged on. */ public ISession getSessionObject() { try { String session = port.iWebsessionManagerGetSessionObject(_this); return new ISession(session,port); } catch (InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (RuntimeFaultMsg e) { throw new WebServiceException(e); } } /** * Logs off the client who has previously logged on * and destroys all resources associated with the session (most importantly, all * managed objects created in the server while the session was active). */ public void logoff() { try { port.iWebsessionManagerLogoff(_this); } catch (InvalidObjectFaultMsg e) { throw new WebServiceException(e); } catch (RuntimeFaultMsg e) { throw new WebServiceException(e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy