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
  --- | --- | ---
  `void` | `close()` |
  `WXMClientConfiguration` | `configuration()` |
  `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 void` | `vmDefine​(WXMVirtualMachine machine)` | Define a new virtual machine.
  `void` | `vmDefineAll​(WXMVirtualMachineSet machines)` | Define a set of new virtual machines.
  `void` | `vmDelete​(java.util.UUID id)` | Delete the configuration for a virtual machine.
  `WXMVirtualMachine` | `vmFind​(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.
  `void` | `vmKill​(WXMVirtualMachine machine, WXMDryRun dryRun)` | Kill a running virtual machine.
  `WXMVirtualMachineSet` | `vmList()` | List the available virtual machines.
  `void` | `vmRealize​(WXMVirtualMachine machine, WXMDryRun dryRun)` | Realize a virtual machine.
  `void` | `vmRun​(WXMVirtualMachine machine, WXMBootConfigurationName bootConfigurationName, WXMDryRun dryRun)` | Start a virtual machine.
  `void` | `vmUpdate​(WXMVirtualMachine machine)` | Update an existing virtual machine.

- ## Method Details

  - ### close

    void close() throws WXMException
    Specified by:
      `close` in interface `java.lang.AutoCloseable`
    Throws:
      `WXMException`

  - ### vmList

    WXMVirtualMachineSet vmList() throws WXMException
    List the available virtual machines.
    Returns:
      A set of machines
    Throws:
      `WXMException` - On errors

  - ### vmFind

    WXMVirtualMachine vmFind​(java.util.UUID id) throws WXMException
    Find a virtual machine with the given ID.
    Parameters:
      `id` - The ID of the machine
    Returns:
      A virtual machine
    Throws:
      `WXMException` - On errors

  - ### vmFindOptional

    java.util.Optional<WXMVirtualMachine> vmFindOptional​(java.util.UUID id) throws WXMException
    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

    void vmUpdate​(WXMVirtualMachine machine) throws WXMException
    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

    void vmDefineAll​(WXMVirtualMachineSet machines) throws WXMException
    Define a set of new virtual machines.
    Parameters:
      `machines` - The virtual machine
    Throws:
      `WXMException` - On errors

  - ### vmDefine

    default void vmDefine​(WXMVirtualMachine machine) throws WXMException
    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.InterruptedException
    Start 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 machine
      `bootConfigurationName` - The boot configuration used
      `dryRun` - Whether or not the operation is a dry run
    Throws:
      `WXMException` - On errors
      `java.lang.InterruptedException` - If the operation was interrupted

  - ### vmDelete

    void vmDelete​(java.util.UUID id) throws WXMException
    Delete the configuration for a virtual machine.
    Parameters:
      `id` - The machine ID
    Throws:
      `WXMException` - On errors

  - ### vmConsoleGet

    java.util.Optional<WXMDeviceType> vmConsoleGet​(WXMVirtualMachine machine)
    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

    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. 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

    void vmRealize​(WXMVirtualMachine machine, WXMDryRun dryRun) throws WXMException
    Realize a virtual machine.
    Parameters:
      `machine` - The virtual machine
      `dryRun` - Whether or not the operation is a dry run
    Throws:
      `WXMException` - On errors

  - ### vmKill

    void vmKill​(WXMVirtualMachine machine, WXMDryRun dryRun) throws WXMException
    Kill a running virtual machine.
    Parameters:
      `dryRun` - Whether or not the operation is a dry run
      `machine` - The virtual machine
    Throws:
      `WXMException`