Package com.io7m.waxmill.client.api

# Class WXMClientConfiguration

java.lang.Object
com.io7m.waxmill.client.api.WXMClientConfiguration

All Implemented Interfaces:
  `WXMClientConfigurationType`

    public final class WXMClientConfiguration
    extends java.lang.Object
    implements WXMClientConfigurationType

Configuration values passed to the client.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMClientConfiguration.Builder` | Builds instances of type `WXMClientConfiguration`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.nio.file.Path` | `bhyveCtlExecutable()` |
  `java.nio.file.Path` | `bhyveExecutable()` |
  `static WXMClientConfiguration.Builder` | `builder()` | Creates a builder for `WXMClientConfiguration`.
  `static WXMClientConfiguration` | `copyOf​(WXMClientConfigurationType instance)` | Creates an immutable copy of a `WXMClientConfigurationType` value.
  `java.nio.file.Path` | `cuExecutable()` |
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMClientConfiguration` that have equal attribute values.
  `java.nio.file.Path` | `grubBhyveExecutable()` |
  `int` | `hashCode()` | Computes a hash code from attributes: `virtualMachineConfigurationDirectory`, `virtualMachineRuntimeDirectory`, `bhyveExecutable`, `bhyveCtlExecutable`, `grubBhyveExecutable`, `zfsExecutable`, `ifconfigExecutable`, `cuExecutable`.
  `java.nio.file.Path` | `ifconfigExecutable()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMClientConfiguration` with attribute values.
  `java.nio.file.Path` | `virtualMachineConfigurationDirectory()` | A directory that contains virtual machine configurations.
  `java.nio.file.Path` | `virtualMachineRuntimeDirectory()` | A directory that contains virtual machines.
  `WXMClientConfiguration` | `withBhyveCtlExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `bhyveCtlExecutable` attribute.
  `WXMClientConfiguration` | `withBhyveExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `bhyveExecutable` attribute.
  `WXMClientConfiguration` | `withCuExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `cuExecutable` attribute.
  `WXMClientConfiguration` | `withGrubBhyveExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `grubBhyveExecutable` attribute.
  `WXMClientConfiguration` | `withIfconfigExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `ifconfigExecutable` attribute.
  `WXMClientConfiguration` | `withVirtualMachineConfigurationDirectory​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `virtualMachineConfigurationDirectory` attribute.
  `WXMClientConfiguration` | `withVirtualMachineRuntimeDirectory​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `virtualMachineRuntimeDirectory` attribute.
  `WXMClientConfiguration` | `withZfsExecutable​(java.nio.file.Path value)` | Copy the current immutable object by setting a value for the `zfsExecutable` attribute.
  `java.nio.file.Path` | `zfsExecutable()` |

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.waxmill.client.api.WXMClientConfigurationType

  `checkPreconditions, virtualMachineRuntimeDirectoryFor`

- ## Method Details

  - ### virtualMachineConfigurationDirectory

    public java.nio.file.Path virtualMachineConfigurationDirectory()
    A directory that contains virtual machine configurations.
    Specified by:
      `virtualMachineConfigurationDirectory` in interface `WXMClientConfigurationType`
    Returns:
      The virtual machine configuration directory

  - ### virtualMachineRuntimeDirectory

    public java.nio.file.Path virtualMachineRuntimeDirectory()
    A directory that contains virtual machines. This directory will contain one ZFS filesystem per virtual machine.
    Specified by:
      `virtualMachineRuntimeDirectory` in interface `WXMClientConfigurationType`
    Returns:
      The ZFS directory containing virtual machines

  - ### bhyveExecutable

    public java.nio.file.Path bhyveExecutable()
    Specified by:
      `bhyveExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "bhyve" executable path, such as `/usr/sbin/bhyve`

  - ### bhyveCtlExecutable

    public java.nio.file.Path bhyveCtlExecutable()
    Specified by:
      `bhyveCtlExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "bhyvectl" executable path, such as `/usr/sbin/bhyvectl`

  - ### grubBhyveExecutable

    public java.nio.file.Path grubBhyveExecutable()
    Specified by:
      `grubBhyveExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "grub-bhyve" executable path, such as `/usr/local/sbin/grub-bhyve`

  - ### zfsExecutable

    public java.nio.file.Path zfsExecutable()
    Specified by:
      `zfsExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "zfs" executable path, such as `/sbin/zfs`

  - ### ifconfigExecutable

    public java.nio.file.Path ifconfigExecutable()
    Specified by:
      `ifconfigExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "ifconfig" executable path, such as `/sbin/ifconfig`

  - ### cuExecutable

    public java.nio.file.Path cuExecutable()
    Specified by:
      `cuExecutable` in interface `WXMClientConfigurationType`
    Returns:
      The "cu" executable path, such as `/usr/bin/cu`

  - ### withVirtualMachineConfigurationDirectory

    public final WXMClientConfiguration withVirtualMachineConfigurationDirectory​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `virtualMachineConfigurationDirectory` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for virtualMachineConfigurationDirectory
    Returns:
      A modified copy of the `this` object

  - ### withVirtualMachineRuntimeDirectory

    public final WXMClientConfiguration withVirtualMachineRuntimeDirectory​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `virtualMachineRuntimeDirectory` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for virtualMachineRuntimeDirectory
    Returns:
      A modified copy of the `this` object

  - ### withBhyveExecutable

    public final WXMClientConfiguration withBhyveExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `bhyveExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for bhyveExecutable
    Returns:
      A modified copy of the `this` object

  - ### withBhyveCtlExecutable

    public final WXMClientConfiguration withBhyveCtlExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `bhyveCtlExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for bhyveCtlExecutable
    Returns:
      A modified copy of the `this` object

  - ### withGrubBhyveExecutable

    public final WXMClientConfiguration withGrubBhyveExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `grubBhyveExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for grubBhyveExecutable
    Returns:
      A modified copy of the `this` object

  - ### withZfsExecutable

    public final WXMClientConfiguration withZfsExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `zfsExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for zfsExecutable
    Returns:
      A modified copy of the `this` object

  - ### withIfconfigExecutable

    public final WXMClientConfiguration withIfconfigExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `ifconfigExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for ifconfigExecutable
    Returns:
      A modified copy of the `this` object

  - ### withCuExecutable

    public final WXMClientConfiguration withCuExecutable​(java.nio.file.Path value)
    Copy the current immutable object by setting a value for the `cuExecutable` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for cuExecutable
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMClientConfiguration` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `virtualMachineConfigurationDirectory`, `virtualMachineRuntimeDirectory`, `bhyveExecutable`, `bhyveCtlExecutable`, `grubBhyveExecutable`, `zfsExecutable`, `ifconfigExecutable`, `cuExecutable`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMClientConfiguration` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMClientConfiguration copyOf​(WXMClientConfigurationType instance)
    Creates an immutable copy of a `WXMClientConfigurationType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable WXMClientConfiguration instance

  - ### builder

    public static WXMClientConfiguration.Builder builder()
    Creates a builder for `WXMClientConfiguration`.

         WXMClientConfiguration.builder()
            .setVirtualMachineConfigurationDirectory(java.nio.file.Path) // required virtualMachineConfigurationDirectory
            .setVirtualMachineRuntimeDirectory(java.nio.file.Path) // required virtualMachineRuntimeDirectory
            .setBhyveExecutable(java.nio.file.Path) // optional bhyveExecutable
            .setBhyveCtlExecutable(java.nio.file.Path) // optional bhyveCtlExecutable
            .setGrubBhyveExecutable(java.nio.file.Path) // optional grubBhyveExecutable
            .setZfsExecutable(java.nio.file.Path) // optional zfsExecutable
            .setIfconfigExecutable(java.nio.file.Path) // optional ifconfigExecutable
            .setCuExecutable(java.nio.file.Path) // optional cuExecutable
            .build();

    Returns:
      A new WXMClientConfiguration builder