Package io.micronaut.discovery.client
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
ConstructorDescriptionDiscoveryServerInstanceList
(DiscoveryClientConfiguration configuration, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionList<io.micronaut.discovery.ServiceInstance>
int
getOrder()
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 configurationinstanceConfiguration
- The instance configuration
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-
getInstances
- Specified by:
getInstances
in interfaceio.micronaut.discovery.ServiceInstanceList
-
onApplicationEvent
public void onApplicationEvent(io.micronaut.runtime.server.event.ServerStartupEvent event) - Specified by:
onApplicationEvent
in interfaceio.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>
-