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 ofNetworkConfiguration.Use the builder to create immutable instances:
ImmutableNetworkConfiguration.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNetworkConfiguration.AgentNetworkConfigurationImmutable implementation ofNetworkConfiguration.AgentNetworkConfiguration.static classImmutableNetworkConfiguration.BuilderBuilds instances of typeImmutableNetworkConfiguration.static classImmutableNetworkConfiguration.EnvironmentConfigurationImmutable implementation ofNetworkConfiguration.EnvironmentConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkConfiguration.AgentNetworkConfigurationagentNetworkConfiguration()Set ofNamedHostAndPortrepresenting the agent network.static ImmutableNetworkConfiguration.Builderbuilder()Creates a builder forImmutableNetworkConfiguration.static ImmutableNetworkConfigurationcopyOf(NetworkConfiguration instance)Creates an immutable copy of aNetworkConfigurationvalue.InstantcreationDate()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.NetworkConfiguration.EnvironmentConfigurationenvironmentConfiguration()Set ofEnvironmentrepresenting environment declared.booleanequals(Object another)This instance is equal to all instances ofImmutableNetworkConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:creationDate,agentNetworkConfiguration,environmentConfiguration.StringtoString()Prints the immutable valueNetworkConfigurationwith attribute values.ImmutableNetworkConfigurationwithAgentNetworkConfiguration(NetworkConfiguration.AgentNetworkConfiguration value)Copy the current immutable object by setting a value for theagentNetworkConfigurationattribute.ImmutableNetworkConfigurationwithCreationDate(Instant value)Copy the current immutable object by setting a value for thecreationDateattribute.ImmutableNetworkConfigurationwithEnvironmentConfiguration(NetworkConfiguration.EnvironmentConfiguration value)Copy the current immutable object by setting a value for theenvironmentConfigurationattribute.
-
-
-
Method Detail
-
creationDate
public Instant 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
public NetworkConfiguration.AgentNetworkConfiguration agentNetworkConfiguration()
Set ofNamedHostAndPortrepresenting the agent network.- Specified by:
agentNetworkConfigurationin interfaceNetworkConfiguration
-
environmentConfiguration
public NetworkConfiguration.EnvironmentConfiguration environmentConfiguration()
Set ofEnvironmentrepresenting environment declared.- Specified by:
environmentConfigurationin interfaceNetworkConfiguration
-
withCreationDate
public final ImmutableNetworkConfiguration withCreationDate(Instant value)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueNetworkConfigurationwith attribute values.
-
copyOf
public static ImmutableNetworkConfiguration copyOf(NetworkConfiguration instance)
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
public static ImmutableNetworkConfiguration.Builder 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
-
-