public class MultipleServiceDiscovery extends Object implements ServiceDiscovery
| Modifier and Type | Field and Description |
|---|---|
static String |
REGISTRY_PREFIX_KEY |
| Constructor and Description |
|---|
MultipleServiceDiscovery(org.apache.dubbo.common.URL registryURL) |
| Modifier and Type | Method and Description |
|---|---|
void |
addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) |
ServiceInstancesChangedListener |
createListener(Set<String> serviceNames) |
void |
destroy() |
List<ServiceInstance> |
getInstances(String serviceName) |
ServiceInstance |
getLocalInstance() |
org.apache.dubbo.metadata.MetadataInfo |
getLocalMetadata() |
org.apache.dubbo.metadata.MetadataInfo |
getLocalMetadata(String revision) |
org.apache.dubbo.metadata.MetadataInfo |
getRemoteMetadata(String revision) |
org.apache.dubbo.metadata.MetadataInfo |
getRemoteMetadata(String revision,
List<ServiceInstance> instances) |
Set<String> |
getServices() |
org.apache.dubbo.common.URL |
getUrl() |
boolean |
isDestroy() |
List<org.apache.dubbo.common.URL> |
lookup(org.apache.dubbo.common.URL url) |
void |
register() |
void |
register(org.apache.dubbo.common.URL url) |
void |
subscribe(org.apache.dubbo.common.URL url,
NotifyListener listener) |
void |
unregister() |
void |
unregister(org.apache.dubbo.common.URL url) |
void |
unsubscribe(org.apache.dubbo.common.URL url,
NotifyListener listener) |
void |
update() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDelay, isAvailable, removeServiceInstancesChangedListener, toStringpublic static final String REGISTRY_PREFIX_KEY
public MultipleServiceDiscovery(org.apache.dubbo.common.URL registryURL)
public org.apache.dubbo.common.URL getUrl()
getUrl in interface ServiceDiscoverypublic void destroy()
throws Exception
destroy in interface ServiceDiscoveryExceptionpublic boolean isDestroy()
isDestroy in interface ServiceDiscoverypublic void register()
throws RuntimeException
register in interface ServiceDiscoveryRuntimeExceptionpublic void update()
throws RuntimeException
update in interface ServiceDiscoveryRuntimeExceptionpublic void unregister()
throws RuntimeException
unregister in interface ServiceDiscoveryRuntimeExceptionpublic void addServiceInstancesChangedListener(ServiceInstancesChangedListener listener) throws NullPointerException, IllegalArgumentException
addServiceInstancesChangedListener in interface ServiceDiscoveryNullPointerExceptionIllegalArgumentExceptionpublic ServiceInstancesChangedListener createListener(Set<String> serviceNames)
createListener in interface ServiceDiscoverypublic List<ServiceInstance> getInstances(String serviceName)
getInstances in interface ServiceDiscoverypublic Set<String> getServices()
getServices in interface ServiceDiscoverypublic ServiceInstance getLocalInstance()
getLocalInstance in interface ServiceDiscoverypublic org.apache.dubbo.metadata.MetadataInfo getLocalMetadata()
getLocalMetadata in interface ServiceDiscoverypublic org.apache.dubbo.metadata.MetadataInfo getLocalMetadata(String revision)
getLocalMetadata in interface ServiceDiscoverypublic org.apache.dubbo.metadata.MetadataInfo getRemoteMetadata(String revision)
getRemoteMetadata in interface ServiceDiscoverypublic org.apache.dubbo.metadata.MetadataInfo getRemoteMetadata(String revision, List<ServiceInstance> instances)
getRemoteMetadata in interface ServiceDiscoverypublic void register(org.apache.dubbo.common.URL url)
register in interface RegistryServicepublic void unregister(org.apache.dubbo.common.URL url)
unregister in interface RegistryServicepublic void subscribe(org.apache.dubbo.common.URL url,
NotifyListener listener)
subscribe in interface RegistryServicepublic void unsubscribe(org.apache.dubbo.common.URL url,
NotifyListener listener)
unsubscribe in interface RegistryServicepublic List<org.apache.dubbo.common.URL> lookup(org.apache.dubbo.common.URL url)
lookup in interface RegistryServiceCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.