Interface WXMClientType

All Superinterfaces:
java.lang.AutoCloseable
All Known Implementing Classes:
WXMClient

public interface WXMClientType
extends java.lang.AutoCloseable
A client.
  • Method Details

    • close

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

      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