Package com.orbitz.consul.model.agent
Class ImmutableServiceProxyUpstream.Builder
- java.lang.Object
-
- com.orbitz.consul.model.agent.ImmutableServiceProxyUpstream.Builder
-
- Enclosing class:
- ImmutableServiceProxyUpstream
@NotThreadSafe public static final class ImmutableServiceProxyUpstream.Builder extends java.lang.ObjectBuilds instances of typeImmutableServiceProxyUpstream. 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
Modifier and Type Method Description ImmutableServiceProxyUpstreambuild()Builds a newImmutableServiceProxyUpstream.ImmutableServiceProxyUpstream.BuilderdestinationName(java.lang.String destinationName)Initializes the value for thedestinationNameattribute.ImmutableServiceProxyUpstream.BuilderdestinationType(java.lang.String destinationType)Initializes the value for thedestinationTypeattribute.ImmutableServiceProxyUpstream.Builderfrom(ServiceProxyUpstream instance)Fill a builder with attribute values from the providedServiceProxyUpstreaminstance.ImmutableServiceProxyUpstream.BuilderlocalBindPort(int localBindPort)Initializes the value for thelocalBindPortattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder from(ServiceProxyUpstream instance)
Fill a builder with attribute values from the providedServiceProxyUpstreaminstance. 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
-
destinationType
@CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder destinationType(java.lang.String destinationType)
Initializes the value for thedestinationTypeattribute.- Parameters:
destinationType- The value for destinationType- Returns:
thisbuilder for use in a chained invocation
-
destinationName
@CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder destinationName(java.lang.String destinationName)
Initializes the value for thedestinationNameattribute.- Parameters:
destinationName- The value for destinationName- Returns:
thisbuilder for use in a chained invocation
-
localBindPort
@CanIgnoreReturnValue public final ImmutableServiceProxyUpstream.Builder localBindPort(int localBindPort)
Initializes the value for thelocalBindPortattribute.- Parameters:
localBindPort- The value for localBindPort- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableServiceProxyUpstream build()
Builds a newImmutableServiceProxyUpstream.- Returns:
- An immutable instance of ServiceProxyUpstream
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-
-