Class ImmutableNetworkConfiguration
java.lang.Object
com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration
- All Implemented Interfaces:
NetworkConfiguration
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNetworkConfiguration
extends Object
implements NetworkConfiguration
Immutable implementation of
NetworkConfiguration.
Use the builder to create immutable instances:
ImmutableNetworkConfiguration.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImmutable implementation ofNetworkConfiguration.AgentNetworkConfiguration.static final classBuilds instances of typeImmutableNetworkConfiguration.static final classImmutable implementation ofNetworkConfiguration.EnvironmentConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionSet ofNamedHostAndPortrepresenting the agent network.builder()Creates a builder forImmutableNetworkConfiguration.copyOf(NetworkConfiguration instance) Creates an immutable copy of aNetworkConfigurationvalue.Used to determine if a configuration have already been applied, and to avoid infinite-loop / dead-lock when propagating the configuration in the agent network.Set ofEnvironmentrepresenting environment declared.booleanThis instance is equal to all instances ofImmutableNetworkConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:creationDate,agentNetworkConfiguration,environmentConfiguration.toString()Prints the immutable valueNetworkConfigurationwith attribute values.Copy the current immutable object by setting a value for theagentNetworkConfigurationattribute.withCreationDate(Instant value) Copy the current immutable object by setting a value for thecreationDateattribute.Copy the current immutable object by setting a value for theenvironmentConfigurationattribute.
-
Method Details
-
creationDate
Used to determine if a configuration have already been applied, and to avoid infinite-loop / dead-lock when propagating the configuration in the agent network.- Specified by:
creationDatein interfaceNetworkConfiguration
-
agentNetworkConfiguration
Set ofNamedHostAndPortrepresenting the agent network.- Specified by:
agentNetworkConfigurationin interfaceNetworkConfiguration
-
environmentConfiguration
Set ofEnvironmentrepresenting environment declared.- Specified by:
environmentConfigurationin interfaceNetworkConfiguration
-
withCreationDate
Copy the current immutable object by setting a value for thecreationDateattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for creationDate- Returns:
- A modified copy of the
thisobject
-
withAgentNetworkConfiguration
public final ImmutableNetworkConfiguration withAgentNetworkConfiguration(NetworkConfiguration.AgentNetworkConfiguration value) Copy the current immutable object by setting a value for theagentNetworkConfigurationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for agentNetworkConfiguration- Returns:
- A modified copy of the
thisobject
-
withEnvironmentConfiguration
public final ImmutableNetworkConfiguration withEnvironmentConfiguration(NetworkConfiguration.EnvironmentConfiguration value) Copy the current immutable object by setting a value for theenvironmentConfigurationattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for environmentConfiguration- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableNetworkConfigurationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:creationDate,agentNetworkConfiguration,environmentConfiguration. -
toString
Prints the immutable valueNetworkConfigurationwith attribute values. -
copyOf
Creates an immutable copy of aNetworkConfigurationvalue. 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 NetworkConfiguration instance
-
builder
Creates a builder forImmutableNetworkConfiguration.ImmutableNetworkConfiguration.builder() .creationDate(java.time.Instant) // requiredcreationDate.agentNetworkConfiguration(com.chutneytesting.agent.domain.configure.NetworkConfiguration.AgentNetworkConfiguration) // requiredagentNetworkConfiguration.environmentConfiguration(com.chutneytesting.agent.domain.configure.NetworkConfiguration.EnvironmentConfiguration) // requiredenvironmentConfiguration.build();- Returns:
- A new ImmutableNetworkConfiguration builder
-