Class ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder
- java.lang.Object
-
- com.chutneytesting.agent.domain.configure.ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder
-
- Enclosing class:
- ImmutableNetworkConfiguration.AgentNetworkConfiguration
@NotThreadSafe public static final class ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder extends Object
Builds instances of typeAgentNetworkConfiguration. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder from(NetworkConfiguration.AgentNetworkConfiguration instance)
Fill a builder with attribute values from the providedAgentNetworkConfigurationinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAgentInfos(NamedHostAndPort element)
Adds one element toagentInfosset.- Parameters:
element- A agentInfos element- Returns:
thisbuilder for use in a chained invocation
-
addAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAgentInfos(NamedHostAndPort... elements)
Adds elements toagentInfosset.- Parameters:
elements- An array of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
agentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder agentInfos(Iterable<? extends NamedHostAndPort> elements)
Sets or replaces all elements foragentInfosset.- Parameters:
elements- An iterable of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAgentInfos
@CanIgnoreReturnValue public final ImmutableNetworkConfiguration.AgentNetworkConfiguration.Builder addAllAgentInfos(Iterable<? extends NamedHostAndPort> elements)
Adds elements toagentInfosset.- Parameters:
elements- An iterable of agentInfos elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableNetworkConfiguration.AgentNetworkConfiguration build()
Builds a newAgentNetworkConfiguration.- Returns:
- An immutable instance of AgentNetworkConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-
-