public class InstanceDiscoveryListener extends Object
| Constructor and Description |
|---|
InstanceDiscoveryListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
InstanceRegistry registry,
InstanceRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
discover() |
Set<String> |
getIgnoredServices() |
Set<String> |
getServices() |
protected boolean |
matchesPattern(String serviceId,
Set<String> patterns) |
void |
onApplicationEvent(org.springframework.cloud.client.discovery.event.HeartbeatEvent event) |
void |
onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) |
void |
onInstanceRegistered(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent<?> event) |
void |
onParentHeartbeat(org.springframework.cloud.client.discovery.event.ParentHeartbeatEvent event) |
protected reactor.core.publisher.Mono<InstanceId> |
registerInstance(org.springframework.cloud.client.ServiceInstance instance) |
protected reactor.core.publisher.Mono<Void> |
removeStaleInstances(Set<InstanceId> registeredInstanceIds) |
void |
setConverter(ServiceInstanceConverter converter) |
void |
setIgnoredServices(Set<String> ignoredServices) |
void |
setServices(Set<String> services) |
protected boolean |
shouldRegisterService(String serviceId) |
public InstanceDiscoveryListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
InstanceRegistry registry,
InstanceRepository repository)
@EventListener public void onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event)
@EventListener public void onInstanceRegistered(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent<?> event)
@EventListener public void onParentHeartbeat(org.springframework.cloud.client.discovery.event.ParentHeartbeatEvent event)
@EventListener public void onApplicationEvent(org.springframework.cloud.client.discovery.event.HeartbeatEvent event)
protected void discover()
protected reactor.core.publisher.Mono<Void> removeStaleInstances(Set<InstanceId> registeredInstanceIds)
protected boolean shouldRegisterService(String serviceId)
protected reactor.core.publisher.Mono<InstanceId> registerInstance(org.springframework.cloud.client.ServiceInstance instance)
public void setConverter(ServiceInstanceConverter converter)
Copyright © 2018 codecentric AG. All rights reserved.