
com.sun.xml.ws.commons.virtualbox.ISnapshot Maven / Gradle / Ivy
package com.sun.xml.ws.commons.virtualbox;
import java.util.List;
import java.util.UUID;
import javax.xml.ws.WebServiceException;
/**
* The ISnapshot interface represents a snapshot of the virtual
* machine.
*
* Thestores all the information about a virtual
* machine necessary to bring it to exactly the same state as it was at
* the time of taking the snapshot. The snapshot includes:Snapshots can be(taken when the VM is powered off)
* or(taken when the VM is running). The execution
* state of the offline snapshot is called a(it doesn't actually contain any information about memory contents
* or the CPU state, assuming that all hardware is just powered off).Snapshots can be chained. Chained snapshots form a branch where
* every next snapshot is based on the previous one. This chaining is
* mostly related to hard disk branching (seedescription). This means that every time a new snapshot is created,
* a new differencing hard disk is implicitly created for all normal
* hard disks attached to the given virtual machine. This allows to
* fully restore hard disk contents when the machine is later reverted
* to a particular snapshot.
*
* In the current implelemtation, multiple snapshot branches within one
* virtual machine are not allowed. Every machine has a signle branch,
* andoperation adds a new
* snapshot to the top of that branch.
*
* Existings snapshots can be discarded using.Every virtual machine has a current snapshot, identified by. This snapshot is used as
* a base for the(see below), to the effect
* that all normal hard disks of the machine and its execution
* state are based on this snapshot.
*
* In the current implementation, the current snapshot is always the
* last taken snapshot (i.e. the head snapshot on the branch) and it
* cannot be changed.
*
* The current snapshot isif the machine doesn't have
* snapshots at all; in this case the current machine state is just
* current settings of this machine plus its current execution state.The current machine state is what represened by IMachine instances got
* directly from IVirtualBox
* using,, etc. (as opposed
* to instances returned by). This state
* is always used when the machine is.
*
* The current machine state also includes the current execution state.
* If the machine is being currently executed
* (isand above), its execution state is just what's happening now.
* If it is powered off (or), it has a zero execution state.
* If the machine is saved (), its
* execution state is what saved in the execution state file
* ().
*
* If the machine is in the saved state, then, next time it is powered
* on, its execution state will be fully restored from the saved state
* file and the execution will continue from the point where the state
* was saved.
*
* Similarly to snapshots, the current machine state can be discarded
* using.The table below briefly explains the meaning of every snapshot
* operation:
*
*/
public class ISnapshot {
public final VboxPortType port;
public final String _this;
public ISnapshot(String _this, VboxPortType port) {
this._this = _this;
this.port = port;
}
/**
* UUID of the snapshot.
*
*/
public UUID getId() {
try {
String retVal = port.iSnapshotGetId(_this);
return UUID.fromString(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);
}
}
/**
* Short name of the snapshot.
*
*/
public String getName() {
try {
String retVal = port.iSnapshotGetName(_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);
}
}
/**
* Short name of the snapshot.
*
*/
public void setName(String value) {
try {
port.iSnapshotSetName(_this, 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);
}
}
/**
* Optional description of the snapshot.
*
*/
public String getDescription() {
try {
String retVal = port.iSnapshotGetDescription(_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);
}
}
/**
* Optional description of the snapshot.
*
*/
public void setDescription(String value) {
try {
port.iSnapshotSetDescription(_this, 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);
}
}
/**
* Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
*
*/
public long getTimeStamp() {
try {
long retVal = port.iSnapshotGetTimeStamp(_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);
}
}
/**
* if this snapshot is an online snapshot andotherwise.
*
*/
public boolean getOnline() {
try {
boolean retVal = port.iSnapshotGetOnline(_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);
}
}
/**
* Virtual machine this snapshot is taken on. This object
* stores all settings the machine had when taking this snapshot.
*
*/
public IMachine getMachine() {
try {
String retVal = port.iSnapshotGetMachine(_this);
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);
}
}
/**
* Parent snapshot (a snapshot this one is based on).
*
*/
public ISnapshot getParent() {
try {
String retVal = port.iSnapshotGetParent(_this);
return new ISnapshot(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);
}
}
/**
* Child snapshots (all snapshots having this one as a parent).
*
*/
public List getChildren() {
try {
ArrayOfISnapshot retVal = port.iSnapshotGetChildren(_this);
return Helper.wrap(ISnapshot.class, port, ((retVal == null)?null:retVal.getArray()));
} 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);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy