Class WXMClientConfiguration.Builder
- Enclosing class:
- WXMClientConfiguration
public static final class WXMClientConfiguration.Builder
extends java.lang.Object
WXMClientConfiguration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and Type Method Description WXMClientConfigurationbuild()Builds a newWXMClientConfiguration.WXMClientConfiguration.Builderfrom(WXMClientConfigurationType instance)Fill a builder with attribute values from the providedWXMClientConfigurationTypeinstance.WXMClientConfiguration.BuildersetBhyveCtlExecutable(java.nio.file.Path bhyveCtlExecutable)Initializes the value for thebhyveCtlExecutableattribute.WXMClientConfiguration.BuildersetBhyveExecutable(java.nio.file.Path bhyveExecutable)Initializes the value for thebhyveExecutableattribute.WXMClientConfiguration.BuildersetCuExecutable(java.nio.file.Path cuExecutable)Initializes the value for thecuExecutableattribute.WXMClientConfiguration.BuildersetGrubBhyveExecutable(java.nio.file.Path grubBhyveExecutable)Initializes the value for thegrubBhyveExecutableattribute.WXMClientConfiguration.BuildersetIfconfigExecutable(java.nio.file.Path ifconfigExecutable)Initializes the value for theifconfigExecutableattribute.WXMClientConfiguration.BuildersetVirtualMachineConfigurationDirectory(java.nio.file.Path virtualMachineConfigurationDirectory)Initializes the value for thevirtualMachineConfigurationDirectoryattribute.WXMClientConfiguration.BuildersetVirtualMachineRuntimeFilesystem(WXMZFSFilesystem virtualMachineRuntimeFilesystem)Initializes the value for thevirtualMachineRuntimeFilesystemattribute.WXMClientConfiguration.BuildersetZfsExecutable(java.nio.file.Path zfsExecutable)Initializes the value for thezfsExecutableattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedWXMClientConfigurationTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setVirtualMachineConfigurationDirectory
public final WXMClientConfiguration.Builder setVirtualMachineConfigurationDirectory(java.nio.file.Path virtualMachineConfigurationDirectory)Initializes the value for thevirtualMachineConfigurationDirectoryattribute.- Parameters:
virtualMachineConfigurationDirectory- The value for virtualMachineConfigurationDirectory- Returns:
thisbuilder for use in a chained invocation
-
setVirtualMachineRuntimeFilesystem
public final WXMClientConfiguration.Builder setVirtualMachineRuntimeFilesystem(WXMZFSFilesystem virtualMachineRuntimeFilesystem)Initializes the value for thevirtualMachineRuntimeFilesystemattribute.- Parameters:
virtualMachineRuntimeFilesystem- The value for virtualMachineRuntimeFilesystem- Returns:
thisbuilder for use in a chained invocation
-
setBhyveExecutable
Initializes the value for thebhyveExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
bhyveExecutable.- Parameters:
bhyveExecutable- The value for bhyveExecutable- Returns:
thisbuilder for use in a chained invocation
-
setBhyveCtlExecutable
public final WXMClientConfiguration.Builder setBhyveCtlExecutable(java.nio.file.Path bhyveCtlExecutable)Initializes the value for thebhyveCtlExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
bhyveCtlExecutable.- Parameters:
bhyveCtlExecutable- The value for bhyveCtlExecutable- Returns:
thisbuilder for use in a chained invocation
-
setGrubBhyveExecutable
public final WXMClientConfiguration.Builder setGrubBhyveExecutable(java.nio.file.Path grubBhyveExecutable)Initializes the value for thegrubBhyveExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
grubBhyveExecutable.- Parameters:
grubBhyveExecutable- The value for grubBhyveExecutable- Returns:
thisbuilder for use in a chained invocation
-
setZfsExecutable
Initializes the value for thezfsExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
zfsExecutable.- Parameters:
zfsExecutable- The value for zfsExecutable- Returns:
thisbuilder for use in a chained invocation
-
setIfconfigExecutable
public final WXMClientConfiguration.Builder setIfconfigExecutable(java.nio.file.Path ifconfigExecutable)Initializes the value for theifconfigExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
ifconfigExecutable.- Parameters:
ifconfigExecutable- The value for ifconfigExecutable- Returns:
thisbuilder for use in a chained invocation
-
setCuExecutable
Initializes the value for thecuExecutableattribute.If not set, this attribute will have a default value as returned by the initializer of
cuExecutable.- Parameters:
cuExecutable- The value for cuExecutable- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMClientConfiguration.- Returns:
- An immutable instance of WXMClientConfiguration
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-