Class EurekaConfig

java.lang.Object
org.kiwiproject.registry.eureka.config.EurekaConfig
Direct Known Subclasses:
EurekaRegistrationConfig

public class EurekaConfig extends Object
Base configuration class for Eureka registry client configuration.
  • Constructor Details

    • EurekaConfig

      public EurekaConfig()
  • Method Details

    • getRegistryUrls

      @NotBlank public @NotBlank String getRegistryUrls()
      Returns:
      comma separated list of urls pointing to Eureka servers, with domains replaced if domainOverride is set
    • setRegistryUrls

      public void setRegistryUrls(String urlCsv)
      Set the comma-separate list of Eureka server URLs.
      Parameters:
      urlCsv - a string containing the CSV string containing Eureka server URLs
    • setRegistryUrls

      public void setRegistryUrls(List<String> urls)
      Convenience method to set Eureka server URLS from a list of URLs rather than a CSV string.
      Parameters:
      urls - the list of URLs to set
    • setRetryId

      public void setRetryId(String id)
      Sets the retry ID to "EurekaRegistryClient-" + id.
      Parameters:
      id - a unique identifier
      See Also:
    • retryId

      public static String retryId(Object identifier)
      Generates a retryId by appending the String value of identifier to "EurekaRegistryClient-".
      Parameters:
      identifier - the unique identifier to use
      Returns:
      a new retry identifier
      Implementation Note:
      if identifier as a String starts with "EurekaRegistryClient-", that value returned as-is
    • getDomainOverride

      public String getDomainOverride()
      Allows for adjusting registryUrls domain at runtime. This is useful if the urls are constant across services but a single service needs to access the server on a different domain due to networking restrictions
    • isIncludeNativeData

      public boolean isIncludeNativeData()
      If true, enables the addition of Eureka specific data to ServiceInstance.
    • getRetryId

      public String getRetryId()
      A unique ID that will be used when logging HTTP call attempts to Eureka.

      The default is "EurekaRegistryClient-" plus a unique integer, e.g. "EurekaRegistryClient-1", "EurekaRegistryClient-2", etc.

    • getRetryProcessingLogLevel

      public org.slf4j.event.Level getRetryProcessingLogLevel()
      The log level to use when logging HTTP call attempts. The default is DEBUG.
    • getRetryExceptionLogLevel

      public org.slf4j.event.Level getRetryExceptionLogLevel()
      The log level to use when logging HTTP call attempts that fail with an exception. The default is WARN.
    • setDomainOverride

      public void setDomainOverride(String domainOverride)
      Allows for adjusting registryUrls domain at runtime. This is useful if the urls are constant across services but a single service needs to access the server on a different domain due to networking restrictions
    • setIncludeNativeData

      public void setIncludeNativeData(boolean includeNativeData)
      If true, enables the addition of Eureka specific data to ServiceInstance.
    • setRetryProcessingLogLevel

      public void setRetryProcessingLogLevel(org.slf4j.event.Level retryProcessingLogLevel)
      The log level to use when logging HTTP call attempts. The default is DEBUG.
    • setRetryExceptionLogLevel

      public void setRetryExceptionLogLevel(org.slf4j.event.Level retryExceptionLogLevel)
      The log level to use when logging HTTP call attempts that fail with an exception. The default is WARN.