org.virtualbox_4_2
Class ISnapshot

java.lang.Object
  extended by org.virtualbox_4_2.IUnknown
      extended by org.virtualbox_4_2.ISnapshot

public class ISnapshot
extends IUnknown

The ISnapshot interface represents a snapshot of the virtual machine. Together with the differencing media that are created when a snapshot is taken, a machine can be brought back to the exact state it was in when the snapshot was taken. The ISnapshot interface has no methods, only attributes; snapshots are controlled through methods of the IConsole interface which also manage the media associated with the snapshot. The following operations exist:

Each snapshot contains a copy of virtual machine's settings (hardware configuration etc.). This copy is contained in an immutable (read-only) instance of IMachine which is available from the snapshot's getMachine() attribute. When restoring the snapshot, these settings are copied back to the original machine. In addition, if the machine was running when the snapshot was taken (IMachine.getState() is MachineState.Running), the current VM state is saved in the snapshot (similarly to what happens when a VM's state is saved). The snapshot is then said to be online because when restoring it, the VM will be running. If the machine was in MachineState.Saved saved, the snapshot receives a copy of the execution state file (IMachine.getStateFilePath()). Otherwise, if the machine was not running (MachineState.PoweredOff or MachineState.Aborted), the snapshot is offline; it then contains a so-called "zero execution state", representing a machine that is powered off. Interface ID: {0472823B-C6E7-472A-8E9F-D732E86B8463}


Field Summary
 
Fields inherited from class org.virtualbox_4_2.IUnknown
obj, port
 
Constructor Summary
ISnapshot(java.lang.String wrapped, org.virtualbox_4_2.jaxws.VboxPortType port)
           
 
Method Summary
 java.util.List<ISnapshot> getChildren()
          Child snapshots (all snapshots having this one as a parent).
 java.lang.Long getChildrenCount()
          Returns the number of direct childrens of this snapshot.
 java.lang.String getDescription()
          Optional description of the snapshot.
 java.lang.String getId()
          UUID of the snapshot.
 IMachine getMachine()
          Virtual machine this snapshot is taken on.
 java.lang.String getName()
          Short name of the snapshot.
 java.lang.Boolean getOnline()
          true if this snapshot is an online snapshot and false otherwise.
 ISnapshot getParent()
          Parent snapshot (a snapshot this one is based on), or null if the snapshot has no parent (i.e.
 java.lang.Long getTimeStamp()
          Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
static ISnapshot queryInterface(IUnknown obj)
           
 void setDescription(java.lang.String value)
          Optional description of the snapshot.
 void setName(java.lang.String value)
          Short name of the snapshot.
 
Methods inherited from class org.virtualbox_4_2.IUnknown
getRemoteWSPort, getWrapped, releaseRemote
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISnapshot

public ISnapshot(java.lang.String wrapped,
                 org.virtualbox_4_2.jaxws.VboxPortType port)
Method Detail

getId

public java.lang.String getId()
UUID of the snapshot.

Returns:
String

getName

public java.lang.String getName()
Short name of the snapshot. NOTE: Setting this attribute causes IMachine.saveSettings() to be called implicitly.

Returns:
String

setName

public void setName(java.lang.String value)
Short name of the snapshot. NOTE: Setting this attribute causes IMachine.saveSettings() to be called implicitly.

Parameters:
value - String

getDescription

public java.lang.String getDescription()
Optional description of the snapshot. NOTE: Setting this attribute causes IMachine.saveSettings() to be called implicitly.

Returns:
String

setDescription

public void setDescription(java.lang.String value)
Optional description of the snapshot. NOTE: Setting this attribute causes IMachine.saveSettings() to be called implicitly.

Parameters:
value - String

getTimeStamp

public java.lang.Long getTimeStamp()
Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.

Returns:
Long

getOnline

public java.lang.Boolean getOnline()
true if this snapshot is an online snapshot and false otherwise. When this attribute is true, the IMachine.getStateFilePath() attribute of the getMachine() object associated with this snapshot will point to the saved state file. Otherwise, it will be an empty string.

Returns:
Boolean

getMachine

public IMachine getMachine()
Virtual machine this snapshot is taken on. This object stores all settings the machine had when taking this snapshot. NOTE: The returned machine object is immutable, i.e. no any settings can be changed.

Returns:
org.virtualbox_4_2.IMachine

getParent

public ISnapshot getParent()
Parent snapshot (a snapshot this one is based on), or null if the snapshot has no parent (i.e. is the first snapshot).

Returns:
org.virtualbox_4_2.ISnapshot

getChildren

public java.util.List<ISnapshot> getChildren()
Child snapshots (all snapshots having this one as a parent). By inspecting this attribute starting with a machine's root snapshot (which can be obtained by calling IMachine.findSnapshot(String) with a null UUID), a machine's snapshots tree can be iterated over.

Returns:
List

queryInterface

public static ISnapshot queryInterface(IUnknown obj)

getChildrenCount

public java.lang.Long getChildrenCount()
Returns the number of direct childrens of this snapshot.