Package org.apache.dubbo.registry.client
Class ReflectionBasedServiceDiscovery
java.lang.Object
org.apache.dubbo.registry.client.AbstractServiceDiscovery
org.apache.dubbo.registry.client.ReflectionBasedServiceDiscovery
- All Implemented Interfaces:
Comparable<Prioritized>,Prioritized,ServiceDiscovery,RegistryService
-
Field Summary
FieldsFields inherited from interface org.apache.dubbo.common.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionReflectionBasedServiceDiscovery(ApplicationModel applicationModel, URL registryURL) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddoInitialize(URL registryURL) voiddoRegister(ServiceInstance serviceInstance) voiddoUnregister(ServiceInstance serviceInstance) final voidfillServiceInstance(DefaultServiceInstance serviceInstance) final ConcurrentHashMap<String, List<ServiceInstance>> Deprecated.getInstances(String serviceName) Gets all service namesfinal voidnotifyListener(String serviceName, ServiceInstancesChangedListener listener, List<ServiceInstance> instances) Methods inherited from class org.apache.dubbo.registry.client.AbstractServiceDiscovery
destroy, getLocalInstance, getLocalMetadata, getLocalMetadata, getRemoteMetadata, getRemoteMetadata, getUrl, isDestroy, lookup, register, register, subscribe, unregister, unregister, unsubscribe, updateMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.common.lang.Prioritized
compareTo, getPriorityMethods inherited from interface org.apache.dubbo.registry.client.ServiceDiscovery
addServiceInstancesChangedListener, createListener, getDelay, isAvailable, removeServiceInstancesChangedListener, toString
-
Field Details
-
metadataServiceProxies
-
-
Constructor Details
-
ReflectionBasedServiceDiscovery
-
-
Method Details
-
doInitialize
-
doDestroy
- Throws:
Exception
-
doRegister
- Throws:
RuntimeException
-
doUnregister
- Throws:
RuntimeException
-
fillServiceInstance
-
notifyListener
public final void notifyListener(String serviceName, ServiceInstancesChangedListener listener, List<ServiceInstance> instances) -
getServices
Description copied from interface:ServiceDiscoveryGets all service names- Returns:
- non-null read-only
Set
-
getInstances
- Throws:
NullPointerException
-
getCachedServiceInstances
@Deprecated public final ConcurrentHashMap<String,List<ServiceInstance>> getCachedServiceInstances()Deprecated.UT used only
-