public class ApplicationDiscoveryListener extends Object
| Constructor and Description |
|---|
ApplicationDiscoveryListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
ApplicationRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkPatternIsMatching(String serviceId,
Set<String> patterns) |
protected void |
discover() |
protected Set<String> |
getAllApplicationIdsFromRegistry() |
Set<String> |
getIgnoredServices() |
Set<String> |
getServices() |
protected boolean |
ignoreService(String serviceId) |
void |
onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event) |
void |
onHeartbeat(org.springframework.cloud.client.discovery.event.HeartbeatEvent event) |
void |
onInstanceRegistered(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent<?> event) |
void |
onParentHeartbeat(org.springframework.cloud.client.discovery.event.ParentHeartbeatEvent event) |
protected String |
register(org.springframework.cloud.client.ServiceInstance instance) |
protected boolean |
registerService(String serviceId) |
void |
setConverter(ServiceInstanceConverter converter) |
void |
setIgnoredServices(Set<String> ignoredServices) |
void |
setServices(Set<String> services) |
public ApplicationDiscoveryListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient,
ApplicationRegistry registry)
@EventListener public void onInstanceRegistered(org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent<?> event)
@EventListener public void onApplicationReady(org.springframework.boot.context.event.ApplicationReadyEvent event)
@EventListener public void onParentHeartbeat(org.springframework.cloud.client.discovery.event.ParentHeartbeatEvent event)
@EventListener public void onHeartbeat(org.springframework.cloud.client.discovery.event.HeartbeatEvent event)
protected void discover()
protected boolean ignoreService(String serviceId)
protected boolean registerService(String serviceId)
protected boolean checkPatternIsMatching(String serviceId, Set<String> patterns)
protected String register(org.springframework.cloud.client.ServiceInstance instance)
public void setConverter(ServiceInstanceConverter converter)
Copyright © 2018 codecentric AG. All rights reserved.