/** * @param host The Discovery server host name */ public void setHost(String host) { if (StringUtils.isNotEmpty(host)) { this.host = host; } }
@Override public void setSecureHealthCheckUrl(String secureHealthCheckUrl) { if (!StringUtils.isEmpty(secureHealthCheckUrl)) { this.secureHealthCheckUrl = secureHealthCheckUrl; } }
/** * Produce a string representation of the given iterable. * * @param iterable The iterable * @return The string representation */ public static String toString(Iterable<?> iterable) { return toString(",", iterable); }
private String computeClientKey(String clientId, String path) { if (StringUtils.isEmpty(clientId)) { return null; } String clientKey = clientId; if (StringUtils.isNotEmpty(path)) { clientKey = clientKey + path; } return clientKey; }
/** * Sets the URIs of the service. * * @param urls The URIs */ public void setUrls(List<URI> urls) { if (CollectionUtils.isNotEmpty(urls)) { this.urls = urls; } }
/** * Whether the given array is not empty. * * @param array The array * @return True if it is */ public static boolean isNotEmpty(Object[] array) { return !isEmpty(array); }
/** * Default constructor. * @param url The URL */ UrlReadable(URL url) { ArgumentUtils.requireNonNull("url", url); this.url = url; }
/** * Replace the dots in the property with underscore and * transform to uppercase. * * @param dottedProperty The property with dots, example - a.b.c * @return The converted value */ public static String convertDotToUnderscore(String dottedProperty) { return convertDotToUnderscore(dottedProperty, true); }
/** * Perform a check on an argument. * * @param name The name of the argument * @param value The value of the argument * @param <T> The value type * @return The {@link ArgumentCheck} */ public static <T> ArgumentCheck check(String name, T value) { return new ArgumentCheck<>(name, value); }
/** * Sets the protocol to use. Default value ({@value io.micronaut.http.ssl.SslConfiguration#DEFAULT_PROTOCOL}). * * @param protocol The protocol */ public void setProtocol(String protocol) { if (!StringUtils.isNotEmpty(protocol)) { this.protocol = protocol; } }
@Override public void setHomePageUrl(String homePageUrl) { if (!StringUtils.isEmpty(homePageUrl)) { this.homePageUrl = homePageUrl; } }
/** * Perform a check on an argument. * * @param check The check * @return The {@link ArgumentCheck} */ public static ArgumentCheck check(Check check) { return new ArgumentCheck(check); }
@Override public void setIpAddr(String ipAddr) { if (StringUtils.isNotEmpty(ipAddr)) { this.ipAddr = ipAddr; } }
@Override public void setStatusPageUrl(String statusPageUrl) { if (!StringUtils.isEmpty(statusPageUrl)) { this.statusPageUrl = statusPageUrl; } }
@Override public void setVipAddress(String vipAddress) { if (StringUtils.isNotEmpty(vipAddress)) { this.vipAddress = vipAddress; } }
@Override public void setHealthCheckUrl(String healthCheckUrl) { if (!StringUtils.isEmpty(healthCheckUrl)) { this.healthCheckUrl = healthCheckUrl; } }
/** * Sets the host to bind to. * @param host The host */ public void setHost(String host) { if (StringUtils.isNotEmpty(host)) { this.host = host; } }
@Override public void setSecureVipAddress(String secureVipAddress) { if (StringUtils.isNotEmpty(secureVipAddress)) { this.secureVipAddress = secureVipAddress; } }
/** * @param datacenter The datacenter * @return The {@link NodeEntry} instance */ public NodeEntry datacenter(String datacenter) { if (StringUtils.isNotEmpty(datacenter)) { this.datacenter = datacenter; } return this; }
@Override public void setAppGroupName(String appGroupName) { if (StringUtils.isNotEmpty(appGroupName)) { this.appGroupName = appGroupName; } }