Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  This library is distributed in the hope that it will be useful, but WITHOUT
  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  *  License for more details.
  *
  * IStorageController.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

Represents a storage controller that is attached to a virtual machine (IMachine). Just as drives (hard disks, DVDs, FDs) are attached to storage controllers in a real computer, virtual drives (represented by IMediumAttachment) are attached to virtual storage controllers, represented by this interface. As opposed to physical hardware, VirtualBox has a very generic concept of a storage controller, and for purposes of the Main API, all virtual storage is attached to virtual machines via instances of this interface. There are five types of such virtual storage controllers: IDE, SCSI, SATA, SAS and Floppy (see getBus()). Depending on which of these four is used, certain sub-types may be available and can be selected in getControllerType(). Depending on these settings, the guest operating system might see significantly different virtual hardware. Interface ID: {A1556333-09B6-46D9-BFB7-FC239B7FBE1E}
 
 public class IStorageController extends IUnknown {
 
     public IStorageController(String wrappedVboxPortType port) {
           super(wrappedport);
     }
 
     public String getName() {
       try {
          String retVal = .iStorageControllerGetName();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Maximum number of devices which can be attached to one port.

Returns:
Long
 
     public Long getMaxDevicesPerPortCount() {
       try {
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Minimum number of ports that getPortCount() can be set to.

Returns:
Long
 
     public Long getMinPortCount() {
       try {
         Long retVal = .iStorageControllerGetMinPortCount();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Maximum number of ports that getPortCount() can be set to.

Returns:
Long
    public Long getMaxPortCount() {
      try {
         Long retVal = .iStorageControllerGetMaxPortCount();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The instance number of the device in the running VM.

Returns:
Long
    public Long getInstance() {
      try {
         Long retVal = .iStorageControllerGetInstance();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The instance number of the device in the running VM.

Parameters:
value Long
    public void setInstance(Long value) {
      try {
        .iStorageControllerSetInstance(value);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The number of currently usable ports on the controller. The minimum and maximum number of ports for one controller are stored in getMinPortCount() and getMaxPortCount().

Returns:
Long
    public Long getPortCount() {
      try {
         Long retVal = .iStorageControllerGetPortCount();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The number of currently usable ports on the controller. The minimum and maximum number of ports for one controller are stored in getMinPortCount() and getMaxPortCount().

Parameters:
value Long
    public void setPortCount(Long value) {
      try {
        .iStorageControllerSetPortCount(value);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).

Returns:
org.virtualbox_4_2.StorageBus
    public org.virtualbox_4_2.StorageBus getBus() {
      try {
         return org.virtualbox_4_2.StorageBus.fromValue(retVal.value());
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The exact variant of storage controller hardware presented to the guest. Depending on this value, VirtualBox will provide a different virtual storage controller hardware to the guest. For SATA, SAS and floppy controllers, only one variant is available, but for IDE and SCSI, there are several. For SCSI controllers, the default type is LsiLogic.

Returns:
org.virtualbox_4_2.StorageControllerType
      try {
         return org.virtualbox_4_2.StorageControllerType.fromValue(retVal.value());
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The exact variant of storage controller hardware presented to the guest. Depending on this value, VirtualBox will provide a different virtual storage controller hardware to the guest. For SATA, SAS and floppy controllers, only one variant is available, but for IDE and SCSI, there are several. For SCSI controllers, the default type is LsiLogic.

Parameters:
value org.virtualbox_4_2.StorageControllerType
      try {
        .iStorageControllerSetControllerType(, org.virtualbox_4_2.jaxws.StorageControllerType.fromValue(value.name()));
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O caches and use synchronous file APIs on the host. This was the only option in the API before VirtualBox 3.2 and is still the default for IDE controllers. If false, the host I/O cache will be disabled for image files attached to this storage controller. Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes it possible to turn off the host I/O caches because the emulation can handle unaligned access to the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many virtual machines are running at the same time to prevent I/O cache related hangs. This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.

Returns:
Boolean
    public Boolean getUseHostIOCache() {
      try {
         Boolean retVal = .iStorageControllerGetUseHostIOCache();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O caches and use synchronous file APIs on the host. This was the only option in the API before VirtualBox 3.2 and is still the default for IDE controllers. If false, the host I/O cache will be disabled for image files attached to this storage controller. Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes it possible to turn off the host I/O caches because the emulation can handle unaligned access to the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many virtual machines are running at the same time to prevent I/O cache related hangs. This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.

Parameters:
value Boolean
    public void setUseHostIOCache(Boolean value) {
      try {
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Returns whether it is possible to boot from disks attached to this controller.

Returns:
Boolean
    public Boolean getBootable() {
      try {
         Boolean retVal = .iStorageControllerGetBootable();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
    public static IStorageController queryInterface(IUnknown obj) {
       return obj == null ?  null : new IStorageController(obj.getWrapped(), obj.getRemoteWSPort());
    }
New to GrepCode? Check out our FAQ X