public interface MetadataService
version() method and group gets from
serviceName(), that means, The different Dubbo service(application) will export the different
MetadataService that persists all the exported and subscribed metadata, they are present by
getExportedURLs() and getSubscribedURLs() respectively. What's more, MetadataService
also providers the fine-grain methods for the precise queries.WritableMetadataService| 限定符和类型 | 字段和说明 |
|---|---|
static String |
ALL_SERVICE_INTERFACES
The value of All service instances
|
static String |
ALL_SERVICE_NAMES
The value of all service names
|
static String |
DEFAULT_EXTENSION |
static String |
SERVICE_INTERFACE_NAME
The service interface name of
MetadataService |
static String |
VERSION
The contract version of
MetadataService, the future update must make sure compatible. |
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
exportServiceDiscoveryMetadata(String metadata)
Export Metadata in Service Instance of Service Discovery
Used for consumer to get Service Instance Metadata
if Registry is unsupported with publishing metadata
|
default String |
getAndListenServiceDiscoveryMetadata(String consumerId,
MetadataChangeListener listener)
1.
|
default SortedSet<String> |
getExportedURLs()
Get the
sorted set of String that presents all Dubbo exported urls |
default SortedSet<String> |
getExportedURLs(String serviceInterface)
Get the
sorted set of String that presents the specified Dubbo exported urls by the serviceInterface |
default SortedSet<String> |
getExportedURLs(String serviceInterface,
String group)
Get the
sorted set of String that presents the specified Dubbo exported urls by the
serviceInterface and group |
default SortedSet<String> |
getExportedURLs(String serviceInterface,
String group,
String version)
Get the
sorted set of String that presents the specified Dubbo exported urls by the
serviceInterface, group and version |
SortedSet<String> |
getExportedURLs(String serviceInterface,
String group,
String version,
String protocol)
Get the sorted set of String that presents the specified Dubbo exported
urls by the
serviceInterface, group, version and protocol |
default Map<String,MetadataChangeListener> |
getMetadataChangeListenerMap()
Get all Metadata listener from local
Used for consumer to get Service Instance Metadata
if Registry is unsupported with publishing metadata
|
MetadataInfo |
getMetadataInfo(String revision) |
Map<String,MetadataInfo> |
getMetadataInfos() |
String |
getServiceDefinition(String serviceKey)
Interface definition.
|
default String |
getServiceDefinition(String interfaceName,
String version,
String group)
Interface definition.
|
default SortedSet<String> |
getSubscribedURLs()
the list of String that presents all Dubbo subscribed
urls |
static boolean |
isMetadataServiceURL(org.apache.dubbo.common.URL url)
Is the
URL for the MetadataService or not? |
String |
serviceName()
Gets the current Dubbo Service name
|
static SortedSet<String> |
toSortedStrings(Iterable<org.apache.dubbo.common.URL> iterable)
|
static SortedSet<String> |
toSortedStrings(Stream<org.apache.dubbo.common.URL> stream)
|
static List<org.apache.dubbo.common.URL> |
toURLs(Iterable<String> urls)
|
default String |
version()
Gets the version of
MetadataService that always equals VERSION |
static final String ALL_SERVICE_INTERFACES
static final String SERVICE_INTERFACE_NAME
MetadataServicestatic final String VERSION
MetadataService, the future update must make sure compatible.String serviceName()
default String version()
MetadataService that always equals VERSIONVERSIONdefault SortedSet<String> getSubscribedURLs()
urlssorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()default SortedSet<String> getExportedURLs()
sorted set of String that presents all Dubbo exported urlssorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()default SortedSet<String> getExportedURLs(String serviceInterface)
sorted set of String that presents the specified Dubbo exported urls by the serviceInterfaceserviceInterface - The class name of Dubbo service interfacesorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()default SortedSet<String> getExportedURLs(String serviceInterface, String group)
sorted set of String that presents the specified Dubbo exported urls by the
serviceInterface and groupserviceInterface - The class name of Dubbo service interfacegroup - the Dubbo Service Group (optional)sorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()default SortedSet<String> getExportedURLs(String serviceInterface, String group, String version)
sorted set of String that presents the specified Dubbo exported urls by the
serviceInterface, group and versionserviceInterface - The class name of Dubbo service interfacegroup - the Dubbo Service Group (optional)version - the Dubbo Service Version (optional)sorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()SortedSet<String> getExportedURLs(String serviceInterface, String group, String version, String protocol)
urls by the
serviceInterface, group, version and protocolserviceInterface - The class name of Dubbo service interfacegroup - the Dubbo Service Group (optional)version - the Dubbo Service Version (optional)protocol - the Dubbo Service Protocol (optional)sorted set of strings presenting the URLstoSortedStrings(Stream),
URL.toFullString()default String getServiceDefinition(String interfaceName, String version, String group)
MetadataInfo getMetadataInfo(String revision)
Map<String,MetadataInfo> getMetadataInfos()
static boolean isMetadataServiceURL(org.apache.dubbo.common.URL url)
URL for the MetadataService or not?url - urlstatic List<org.apache.dubbo.common.URL> toURLs(Iterable<String> urls)
urls - the strings presents the Dubbo URLsstatic SortedSet<String> toSortedStrings(Iterable<org.apache.dubbo.common.URL> iterable)
iterable - Iterable of URLsorted set of strings presentingURL.toFullString()static SortedSet<String> toSortedStrings(Stream<org.apache.dubbo.common.URL> stream)
stream - Stream of URLsorted set of strings presentingURL.toFullString()default void exportServiceDiscoveryMetadata(String metadata)
Used for consumer to get Service Instance Metadata if Registry is unsupported with publishing metadata
metadata - Map of provider Service Instance Metadatadefault Map<String,MetadataChangeListener> getMetadataChangeListenerMap()
Used for consumer to get Service Instance Metadata if Registry is unsupported with publishing metadata
Map of MetadataChangeListenerdefault String getAndListenServiceDiscoveryMetadata(String consumerId, MetadataChangeListener listener)
Used for consumer to get Service Instance Metadata if Registry is unsupported with publishing metadata
consumerId - consumerIdlistener - MetadataChangeListener used to notify eventMap of provider Service Instance MetadataCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.