Class DiscoveryServerInstanceList

java.lang.Object
io.micronaut.discovery.client.DiscoveryServerInstanceList
All Implemented Interfaces:
io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>, io.micronaut.core.order.Ordered, io.micronaut.discovery.ServiceInstanceList, EventListener
Direct Known Subclasses:
ConsulServiceInstanceList, EurekaServiceInstanceList

public abstract class DiscoveryServerInstanceList extends Object implements io.micronaut.discovery.ServiceInstanceList, io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>, io.micronaut.core.order.Ordered
Abstract ServiceInstanceList implementation for Discovery servers like Eureka and Consul.
Since:
1.0
Author:
graemerocher
  • Field Summary

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    DiscoveryServerInstanceList(DiscoveryClientConfiguration configuration, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<io.micronaut.discovery.ServiceInstance>
     
    int
     
    void
    onApplicationEvent(io.micronaut.runtime.server.event.ServerStartupEvent event)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.context.event.ApplicationEventListener

    supports

    Methods inherited from interface io.micronaut.discovery.ServiceInstanceList

    getContextPath, getID
  • Constructor Details

    • DiscoveryServerInstanceList

      public DiscoveryServerInstanceList(DiscoveryClientConfiguration configuration, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration)
      Parameters:
      configuration - The discovery client configuration
      instanceConfiguration - The instance configuration
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
    • getInstances

      public List<io.micronaut.discovery.ServiceInstance> getInstances()
      Specified by:
      getInstances in interface io.micronaut.discovery.ServiceInstanceList
    • onApplicationEvent

      public void onApplicationEvent(io.micronaut.runtime.server.event.ServerStartupEvent event)
      Specified by:
      onApplicationEvent in interface io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>