Package org.apache.dubbo.common.utils
Class UrlUtils
java.lang.Object
org.apache.dubbo.common.utils.UrlUtils
-
Method Summary
Modifier and TypeMethodDescriptionclassifyUrls(List<URL> urls, Predicate<URL> predicate) static <T> TcomputeServiceAttribute(URL url, String key, Function<URL, T> fn) convertSubscribe(Map<String, String> subscribe) static URLgetEmptyUrl(String service, String category) static booleanstatic booleanhasServiceDiscoveryRegistryTypeKey(Map<String, String> parameters) The specified parameters ofURLis service discovery registry type or notstatic booleanThe specifiedURLis service discovery registry type or notstatic booleanisConfigurator(URL url) static booleanisConsumer(URL url) static booleanstatic booleanisMatchCategory(String category, String categories) static booleanisMatchGlobPattern(String pattern, String value) static booleanisMatchGlobPattern(String pattern, String value, URL param) static booleanisProvider(URL url) static booleanisRegistry(URL url) static booleanstatic booleanisServiceDiscoveryURL(URL url) static booleanisServiceKeyMatch(URL pattern, URL value) static String[]parseServiceKey(String serviceKey) static URLrevertForbid(List<String> forbid, Set<URL> subscribed) revertSubscribe(Map<String, String> subscribe) static URLNOTICE: This method allocate too much objects, we can useURLStrParser.parseDecodedStr(String)instead.
-
Method Details
-
parseURL
-
parseURLs
-
convertRegister
-
convertSubscribe
-
revertRegister
-
revertSubscribe
-
revertNotify
-
revertForbid
-
getEmptyUrl
-
isMatchCategory
-
isMatch
-
isMatchGlobPattern
-
isMatchGlobPattern
-
isServiceKeyMatch
-
classifyUrls
-
isConfigurator
-
isRoute
-
isProvider
-
isRegistry
-
hasServiceDiscoveryRegistryTypeKey
The specifiedURLis service discovery registry type or not- Parameters:
url- theURLconnects to the registry- Returns:
- If it is, return
true, orfalse - Since:
- 2.7.5
-
hasServiceDiscoveryRegistryProtocol
-
isServiceDiscoveryURL
-
hasServiceDiscoveryRegistryTypeKey
The specified parameters ofURLis service discovery registry type or not- Parameters:
parameters- the parameters ofURLthat connects to the registry- Returns:
- If it is, return
true, orfalse - Since:
- 2.7.5
-
parseServiceKey
- Parameters:
serviceKey- , {group}/{interfaceName}:{version}- Returns:
- [group, interfaceName, version]
-
valueOf
NOTICE: This method allocate too much objects, we can useURLStrParser.parseDecodedStr(String)instead.Parse url string
- Parameters:
url- URL string- Returns:
- URL instance
- See Also:
-
isConsumer
-
computeServiceAttribute
-