接口 ServiceNameMapping
-
- 所有超级接口:
org.apache.dubbo.rpc.service.Destroyable
- 所有已知实现类:
AbstractServiceNameMapping
@SPI(value="metadata", scope=APPLICATION) public interface ServiceNameMapping extends org.apache.dubbo.rpc.service.DestroyableThis will interact with remote metadata center to find the interface-app mapping and will cache the data locally. Call variants of getCachedMapping() methods whenever need to use the mapping data.
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringDEFAULT_MAPPING_GROUP
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 static StringbuildGroup(String serviceInterface)static StringbuildMappingKey(org.apache.dubbo.common.URL url)Set<String>getAndListen(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.static Set<String>getAppNames(String content)Map<String,Set<String>>getCachedMapping()Set<String>getCachedMapping(String mappingKey)Set<String>getCachedMapping(org.apache.dubbo.common.URL consumerURL)static ServiceNameMappinggetDefaultExtension(org.apache.dubbo.rpc.model.ScopeModel scopeModel)Get the default extension ofServiceNameMappingSet<String>getRemoteMapping(org.apache.dubbo.common.URL consumerURL)voidinitInterfaceAppMapping(org.apache.dubbo.common.URL subscribedURL)Init mapping from local storage and url parameter.booleanmap(org.apache.dubbo.common.URL url)Map the specified Dubbo service interface, group, version and protocol to current Dubbo service namevoidputCachedMapping(String serviceKey, Set<String> apps)Set<String>removeCachedMapping(String serviceKey)MappingListenerstopListen(org.apache.dubbo.common.URL subscribeURL, MappingListener listener)static StringtoStringKeys(Set<String> serviceNames)
-
-
-
方法详细资料
-
map
boolean map(org.apache.dubbo.common.URL url)
Map the specified Dubbo service interface, group, version and protocol to current Dubbo service name
-
getDefaultExtension
static ServiceNameMapping getDefaultExtension(org.apache.dubbo.rpc.model.ScopeModel scopeModel)
Get the default extension ofServiceNameMapping- 返回:
- non-null
ServiceNameMapping
-
buildMappingKey
static String buildMappingKey(org.apache.dubbo.common.URL url)
-
initInterfaceAppMapping
void initInterfaceAppMapping(org.apache.dubbo.common.URL subscribedURL)
Init mapping from local storage and url parameter.
-
getAndListen
Set<String> getAndListen(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.- 参数:
listener- listener that will be notified on mapping change- 返回:
- the latest mapping result from remote center
-
stopListen
MappingListener stopListen(org.apache.dubbo.common.URL subscribeURL, MappingListener listener)
-
-