Add with() method to support external ServiceInstanceListSupplier(#988) (#989)

This commit is contained in:
Zhiguo.Chen
2021-07-27 18:39:27 +08:00
committed by GitHub
parent 9b97470296
commit 9feb443009

View File

@@ -45,6 +45,7 @@ import org.springframework.web.util.UriComponentsBuilder;
*
* @author Spencer Gibb
* @author Olga Maciaszek-Sharma
* @author Zhiguo Chen
*/
public final class ServiceInstanceListSupplierBuilder {
@@ -248,6 +249,19 @@ public final class ServiceInstanceListSupplierBuilder {
return this;
}
/**
* Support {@link ServiceInstanceListSupplierBuilder} can be added to the expansion implementation of
* {@link ServiceInstanceListSupplier} by this method.
* @param delegateCreator a {@link DelegateCreator} object
* @return the {@link ServiceInstanceListSupplierBuilder} object
*/
public ServiceInstanceListSupplierBuilder with(DelegateCreator delegateCreator) {
if (delegateCreator != null) {
creators.add(delegateCreator);
}
return this;
}
/**
* Builds the {@link ServiceInstanceListSupplier} hierarchy.
* @param context application context