public class NacosServiceDiscovery extends AbstractServiceDiscovery
ServiceDiscovery implementationServiceDiscovery| Modifier and Type | Class and Description |
|---|---|
class |
NacosServiceDiscovery.NacosEventListener |
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY| Constructor and Description |
|---|
NacosServiceDiscovery(ApplicationModel applicationModel,
URL registryURL) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) |
void |
doDestroy() |
void |
doRegister(ServiceInstance serviceInstance) |
void |
doUnregister(ServiceInstance serviceInstance) |
List<ServiceInstance> |
getInstances(String serviceName) |
Set<String> |
getServices() |
URL |
getUrl() |
void |
removeServiceInstancesChangedListener(ServiceInstancesChangedListener listener) |
destroy, getLocalInstance, getLocalMetadata, getLocalMetadata, getRemoteMetadata, getRemoteMetadata, isDestroy, lookup, register, register, subscribe, unregister, unregister, unsubscribe, updateequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateListener, getDelay, isAvailable, toStringcompareTo, getPrioritypublic NacosServiceDiscovery(ApplicationModel applicationModel, URL registryURL)
public void doDestroy()
throws Exception
doDestroy in class AbstractServiceDiscoveryExceptionpublic void doRegister(ServiceInstance serviceInstance)
doRegister in class AbstractServiceDiscoverypublic void doUnregister(ServiceInstance serviceInstance) throws RuntimeException
doUnregister in class AbstractServiceDiscoveryRuntimeExceptionpublic List<ServiceInstance> getInstances(String serviceName) throws NullPointerException
NullPointerExceptionpublic void addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) throws NullPointerException, IllegalArgumentException
public void removeServiceInstancesChangedListener(ServiceInstancesChangedListener listener) throws IllegalArgumentException
IllegalArgumentExceptionpublic URL getUrl()
getUrl in interface ServiceDiscoverygetUrl in class AbstractServiceDiscoveryCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.