Package org.apache.dubbo.metadata
Class AbstractServiceNameMapping
java.lang.Object
org.apache.dubbo.metadata.AbstractServiceNameMapping
- All Implemented Interfaces:
ServiceNameMapping,org.apache.dubbo.rpc.service.Destroyable
-
Field Summary
Fields inherited from interface org.apache.dubbo.metadata.ServiceNameMapping
DEFAULT_MAPPING_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionAbstractServiceNameMapping(org.apache.dubbo.rpc.model.ApplicationModel applicationModel) -
Method Summary
Modifier and TypeMethodDescriptionvoid$destroy()get(org.apache.dubbo.common.URL url) Get the service names from the specified Dubbo service interface, group, version and protocolgetAndListen(org.apache.dubbo.common.URL registryURL, org.apache.dubbo.common.URL subscribedURL, MappingListener listener) Get the latest mapping result from remote center and register listener at the same time to get notified once mapping changes.getAndListen(org.apache.dubbo.common.URL url, MappingListener mappingListener) Get the service names from the specified Dubbo service interface, group, version and protocolgetMapping(org.apache.dubbo.common.URL consumerURL) getMappingLock(String key) getRemoteMapping(org.apache.dubbo.common.URL consumerURL) voidputCachedMapping(String serviceKey, Set<String> apps) removeCachedMapping(String serviceKey) voidsetApplicationModel(org.apache.dubbo.rpc.model.ApplicationModel applicationModel) stopListen(org.apache.dubbo.common.URL subscribeURL, MappingListener listener) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.dubbo.metadata.ServiceNameMapping
hasValidMetadataCenter, map
-
Constructor Details
-
AbstractServiceNameMapping
public AbstractServiceNameMapping(org.apache.dubbo.rpc.model.ApplicationModel applicationModel)
-
-
Method Details
-
setApplicationModel
public void setApplicationModel(org.apache.dubbo.rpc.model.ApplicationModel applicationModel) -
get
Get the service names from the specified Dubbo service interface, group, version and protocol- Returns:
-
getAndListen
public abstract Set<String> getAndListen(org.apache.dubbo.common.URL url, MappingListener mappingListener) Get the service names from the specified Dubbo service interface, group, version and protocol- Returns:
-
getAndListen
public Set<String> getAndListen(org.apache.dubbo.common.URL registryURL, org.apache.dubbo.common.URL subscribedURL, MappingListener listener) Description copied from interface:ServiceNameMappingGet the latest mapping result from remote center and register listener at the same time to get notified once mapping changes.- Specified by:
getAndListenin interfaceServiceNameMapping- Parameters:
listener- listener that will be notified on mapping change- Returns:
- the latest mapping result from remote center
-
stopListen
public MappingListener stopListen(org.apache.dubbo.common.URL subscribeURL, MappingListener listener) - Specified by:
stopListenin interfaceServiceNameMapping
-
putCachedMapping
- Specified by:
putCachedMappingin interfaceServiceNameMapping
-
getMapping
- Specified by:
getMappingin interfaceServiceNameMapping
-
getRemoteMapping
- Specified by:
getRemoteMappingin interfaceServiceNameMapping
-
removeCachedMapping
- Specified by:
removeCachedMappingin interfaceServiceNameMapping
-
getMappingLock
-
$destroy
public void $destroy()- Specified by:
$destroyin interfaceorg.apache.dubbo.rpc.service.Destroyable
-