Class AwsServiceDiscoveryClientConfiguration

java.lang.Object
io.micronaut.http.client.HttpClientConfiguration
io.micronaut.discovery.client.DiscoveryClientConfiguration
io.micronaut.discovery.aws.servicediscovery.AwsServiceDiscoveryClientConfiguration

@Internal @Requires(env="ec2") @Requires(property="aws.service-discovery.enabled",value="true",defaultValue="false") @ConfigurationProperties("aws.service-discovery.client") public class AwsServiceDiscoveryClientConfiguration extends io.micronaut.discovery.client.DiscoveryClientConfiguration
Configuration for AWS Route 53 discovery.
Since:
1.0 See https://docs.aws.amazon.com/Route53/latest/APIReference/overview-service-discovery.html for details info
Author:
Rvanderwerf
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.micronaut.http.client.HttpClientConfiguration

    io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration, io.micronaut.http.client.HttpClientConfiguration.DnsResolutionMode, io.micronaut.http.client.HttpClientConfiguration.Http2ClientConfiguration, io.micronaut.http.client.HttpClientConfiguration.WebSocketCompressionConfiguration
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from class io.micronaut.http.client.HttpClientConfiguration

    DEFAULT_ALLOW_BLOCK_EVENT_LOOP, DEFAULT_CONNECTION_POOL_IDLE_TIMEOUT_SECONDS, DEFAULT_DNS_RESOLUTION_MODE, DEFAULT_EXCEPTION_ON_ERROR_STATUS, DEFAULT_FOLLOW_REDIRECTS, DEFAULT_MAX_CONTENT_LENGTH, DEFAULT_READ_IDLE_TIMEOUT_MINUTES, DEFAULT_READ_TIMEOUT_SECONDS, DEFAULT_SHUTDOWN_QUIET_PERIOD_MILLISECONDS, DEFAULT_SHUTDOWN_TIMEOUT_MILLISECONDS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    service id registered to aws.
    io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration
     
    @NonNull io.micronaut.discovery.DiscoveryConfiguration
    Gets the discovery configuration.
    This is the name space ID for the domain/subdomain in route 53 service registry.
    @Nullable io.micronaut.discovery.registration.RegistrationConfiguration
    Get the registration configuration needed to register to service registry.
    protected String
    service ID where you are going to be adding service instances to.
    void
    setAwsServiceId(String awsServiceId)
    set service id for easier testing.
    void
    setNamespaceId(String namespaceId)
    allows you to override the namespace id for testing.

    Methods inherited from class io.micronaut.discovery.client.DiscoveryClientConfiguration

    getAllZones, getContextPath, getDefaultZone, getHost, getPort, getServiceId, isSecure, isShouldUseDns, setContextPath, setDefaultZone, setHost, setPort, setSecure, setShouldUseDns, setZones, toString

    Methods inherited from class io.micronaut.http.client.HttpClientConfiguration

    getAddressResolverGroupName, getAlpnModes, getChannelOptions, getConnectionPoolIdleTimeout, getConnectTimeout, getConnectTtl, getDefaultCharset, getDnsResolutionMode, getEventLoopGroup, getHttp2Configuration, getHttpVersion, getLoggerName, getLogLevel, getMaxContentLength, getNumOfThreads, getPcapLoggingPathPattern, getPlaintextMode, getProxyAddress, getProxyPassword, getProxySelector, getProxyType, getProxyUsername, getReadIdleTimeout, getReadTimeout, getRequestTimeout, getShutdownQuietPeriod, getShutdownTimeout, getSslConfiguration, getThreadFactory, getWebSocketCompressionConfiguration, isAllowBlockEventLoop, isExceptionOnErrorStatus, isFollowRedirects, resolveProxy, setAddressResolverGroupName, setAllowBlockEventLoop, setAlpnModes, setChannelOptions, setConnectionPoolIdleTimeout, setConnectTimeout, setConnectTtl, setDefaultCharset, setDnsResolutionMode, setEventLoopGroup, setExceptionOnErrorStatus, setFollowRedirects, setHttpVersion, setLoggerName, setLogLevel, setMaxContentLength, setNumOfThreads, setPcapLoggingPathPattern, setPlaintextMode, setProxyAddress, setProxyPassword, setProxySelector, setProxyType, setProxyUsername, setReadIdleTimeout, setReadTimeout, setRequestTimeout, setShutdownQuietPeriod, setShutdownTimeout, setSslConfiguration, setThreadFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • AwsServiceDiscoveryClientConfiguration

      public AwsServiceDiscoveryClientConfiguration()
  • Method Details

    • getNamespaceId

      public String getNamespaceId()
      This is the name space ID for the domain/subdomain in route 53 service registry. You must have this defined before doing any operations on using service registry.
      Returns:
      namespace id
    • setNamespaceId

      public void setNamespaceId(String namespaceId)
      allows you to override the namespace id for testing.
      Parameters:
      namespaceId - name space id used for easy of testing
    • getServiceID

      protected String getServiceID()
      service ID where you are going to be adding service instances to.
      Specified by:
      getServiceID in class io.micronaut.discovery.client.DiscoveryClientConfiguration
      Returns:
      the service ID we are working with
    • getDiscovery

      @NonNull public @NonNull io.micronaut.discovery.DiscoveryConfiguration getDiscovery()
      Gets the discovery configuration.
      Specified by:
      getDiscovery in class io.micronaut.discovery.client.DiscoveryClientConfiguration
      Returns:
      configuration
    • getRegistration

      @Nullable public @Nullable io.micronaut.discovery.registration.RegistrationConfiguration getRegistration()
      Get the registration configuration needed to register to service registry.
      Specified by:
      getRegistration in class io.micronaut.discovery.client.DiscoveryClientConfiguration
      Returns:
      configuration
    • getAwsServiceId

      public String getAwsServiceId()
      service id registered to aws.
      Returns:
      service id
    • setAwsServiceId

      public void setAwsServiceId(String awsServiceId)
      set service id for easier testing.
      Parameters:
      awsServiceId - service id
    • getConnectionPoolConfiguration

      public io.micronaut.http.client.HttpClientConfiguration.ConnectionPoolConfiguration getConnectionPoolConfiguration()
      Specified by:
      getConnectionPoolConfiguration in class io.micronaut.http.client.HttpClientConfiguration