Package com.io7m.waxmill.client.api
Interface WXMClientType
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
WXMClient
public interface WXMClientType
extends java.lang.AutoCloseable
A client.
-
Method Summary
Modifier and Type Method Description voidclose()WXMClientConfigurationconfiguration()java.util.Optional<WXMProcessDescription>vmConsole(WXMVirtualMachine machine)Return a process description that, when executed, will give access to the primary console of the given virtual machine.java.util.Optional<WXMDeviceType>vmConsoleGet(WXMVirtualMachine machine)Return the primary console device of the given virtual machine.default voidvmDefine(WXMVirtualMachine machine)Define a new virtual machine.voidvmDefineAll(WXMVirtualMachineSet machines)Define a set of new virtual machines.voidvmDelete(java.util.UUID id)Delete the configuration for a virtual machine.WXMVirtualMachinevmFind(java.util.UUID id)Find a virtual machine with the given ID.java.util.Optional<WXMVirtualMachine>vmFindOptional(java.util.UUID id)Find a virtual machine with the given ID.WXMVirtualMachineSetvmList()List the available virtual machines.voidvmRealize(WXMVirtualMachine machine, WXMDryRun dryRun)Realize a virtual machine.voidvmRun(WXMVirtualMachine machine, WXMBootConfigurationName bootConfigurationName, WXMDryRun dryRun)Start a virtual machine.voidvmUpdate(WXMVirtualMachine machine)Update an existing virtual machine.
-
Method Details
-
close
- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
WXMException
-
vmList
List the available virtual machines.- Returns:
- A set of machines
- Throws:
WXMException- On errors
-
vmFind
Find a virtual machine with the given ID.- Parameters:
id- The ID of the machine- Returns:
- A virtual machine
- Throws:
WXMException- On errors
-
vmFindOptional
Find a virtual machine with the given ID.- Parameters:
id- The ID of the machine- Returns:
- A virtual machine, if one exists
- Throws:
WXMException- On errors
-
vmUpdate
Update an existing virtual machine.- Parameters:
machine- The virtual machine- Throws:
WXMException- On errors
-
configuration
WXMClientConfiguration configuration()- Returns:
- The configuration used to open the client
-
vmDefineAll
Define a set of new virtual machines.- Parameters:
machines- The virtual machine- Throws:
WXMException- On errors
-
vmDefine
Define a new virtual machine.- Parameters:
machine- The virtual machine- Throws:
WXMException- On errors
-
vmRun
void vmRun(WXMVirtualMachine machine, WXMBootConfigurationName bootConfigurationName, WXMDryRun dryRun) throws WXMException, java.lang.InterruptedExceptionStart a virtual machine. If the startup succeeds, this method never returns and the current process is replaced with that of the running virtual machine.- Parameters:
machine- The virtual machinebootConfigurationName- The boot configuration useddryRun- Whether or not the operation is a dry run- Throws:
WXMException- On errorsjava.lang.InterruptedException- If the operation was interrupted
-
vmDelete
Delete the configuration for a virtual machine.- Parameters:
id- The machine ID- Throws:
WXMException- On errors
-
vmConsoleGet
Return the primary console device of the given virtual machine. The method will return nothing if the machine has no console device, or if the machine has more than one potential console.- Parameters:
machine- The virtual machine- Returns:
- A process execution
-
vmConsole
Return a process description that, when executed, will give access to the primary console of the given virtual machine. The method will return nothing if the machine has no console device, or if the machine has more than one potential console.- Parameters:
machine- The virtual machine- Returns:
- A process execution
-
vmRealize
Realize a virtual machine.- Parameters:
machine- The virtual machinedryRun- Whether or not the operation is a dry run- Throws:
WXMException- On errors
-