@NotThreadSafe public static final class ImmutableServiceProxy.Builder extends Object
ImmutableServiceProxy.
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.
@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder from(ServiceProxy instance)
ServiceProxy instance.
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.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder destinationServiceName(String destinationServiceName)
destinationServiceName attribute.destinationServiceName - The value for destinationServiceNamethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder destinationServiceId(String destinationServiceId)
destinationServiceId attribute.destinationServiceId - The value for destinationServiceIdthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder localServiceAddress(String localServiceAddress)
localServiceAddress attribute.localServiceAddress - The value for localServiceAddressthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder localServicePort(int localServicePort)
localServicePort attribute.localServicePort - The value for localServicePortthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder putConfig(String key, String value)
config map.key - The key in the config mapvalue - The associated value in the config mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder putConfig(Map.Entry<String,? extends String> entry)
config map. Nulls are not permittedentry - The key and value entrythis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder config(Map<String,? extends String> entries)
config map. Nulls are not permittedentries - The entries that will be added to the config mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder putAllConfig(Map<String,? extends String> entries)
config map. Nulls are not permittedentries - The entries that will be added to the config mapthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder addUpstreams(ServiceProxyUpstream element)
upstreams list.element - A upstreams elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder addUpstreams(ServiceProxyUpstream... elements)
upstreams list.elements - An array of upstreams elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder upstreams(Iterable<? extends ServiceProxyUpstream> elements)
upstreams list.elements - An iterable of upstreams elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceProxy.Builder addAllUpstreams(Iterable<? extends ServiceProxyUpstream> elements)
upstreams list.elements - An iterable of upstreams elementsthis builder for use in a chained invocationpublic ImmutableServiceProxy build()
ImmutableServiceProxy.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.