Package com.alibaba.dubbo.common

Examples of com.alibaba.dubbo.common.URL.toFullString()


            if (registryURLs != null && registryURLs.size() > 0
                    && url.getParameter("register", true)) {
                for (URL registryURL : registryURLs) {
                    URL monitorUrl = loadMonitor(registryURL);
                    if (monitorUrl != null) {
                        url = url.addParameterAndEncoded(Constants.MONITOR_KEY, monitorUrl.toFullString());
                    }
                    String providerURL = url.toFullString();
                    if (logger.isInfoEnabled()) {
                        logger.info("Register dubbo service " + interfaceClass.getName() + " url " + providerURL + " to registry " + registryURL);
                    }
View Full Code Here


              List<URL> us = loadRegistries(false);
              if (us != null && us.size() > 0) {
                  for (URL u : us) {
                      URL monitorUrl = loadMonitor(u);
                        if (monitorUrl != null) {
                            map.put(Constants.MONITOR_KEY, URL.encode(monitorUrl.toFullString()));
                        }
                      urls.add(u.addParameterAndEncoded(Constants.REFER_KEY, StringUtils.toQueryString(map)));
                    }
              }
              if (urls == null || urls.size() == 0) {
View Full Code Here

              List<URL> us = loadRegistries();
              if (us != null && us.size() > 0) {
                  for (URL u : us) {
                      URL monitorUrl = loadMonitor(u);
                        if (monitorUrl != null) {
                            map.put(Constants.MONITOR_KEY, URL.encode(monitorUrl.toFullString()));
                        }
                      urls.add(u.addParameterAndEncoded(RpcConstants.REFER_KEY, StringUtils.toQueryString(map)));
                    }
              }
              if (urls == null || urls.size() == 0) {
View Full Code Here

            if (registryURLs != null && registryURLs.size() > 0
                    && url.getParameter("register", true)) {
                for (URL registryURL : registryURLs) {
                    URL monitorUrl = loadMonitor(registryURL);
                    if (monitorUrl != null) {
                        url = url.addParameterAndEncoded(Constants.MONITOR_KEY, monitorUrl.toFullString());
                    }
                    String providerURL = url.toFullString();
                    if (logger.isInfoEnabled()) {
                        logger.info("Register dubbo service " + interfaceClass.getName() + " url " + providerURL + " to registry " + registryURL);
                    }
View Full Code Here

        Map<String, Invoker<T>> newUrlInvokerMap = new HashMap<String, Invoker<T>>();
        Set<String> keys = new HashSet<String>();
        for (URL providerUrl : urls) {
            URL url = mergeUrl(providerUrl);
           
            String key = url.toFullString(); // URL参数是排序的
            if (keys.contains(key)) { // 重复URL
                continue;
            }
            keys.add(key);
            // 缓存key为没有合并消费端参数的URL,不管消费端如何合并参数,如果服务端URL发生变化,则重新refer
View Full Code Here

              List<URL> us = loadRegistries();
              if (us != null && us.size() > 0) {
                  for (URL u : us) {
                      URL monitorUrl = loadMonitor(u);
                        if (monitorUrl != null) {
                            map.put(Constants.MONITOR_KEY, URL.encode(monitorUrl.toFullString()));
                        }
                      urls.add(u.addParameterAndEncoded(Constants.REFER_KEY, StringUtils.toQueryString(map)));
                    }
              }
              if (urls == null || urls.size() == 0) {
View Full Code Here

            if (registryURLs != null && registryURLs.size() > 0
                    && url.getParameter("register", true)) {
                for (URL registryURL : registryURLs) {
                    URL monitorUrl = loadMonitor(registryURL);
                    if (monitorUrl != null) {
                        url = url.addParameterAndEncoded(Constants.MONITOR_KEY, monitorUrl.toFullString());
                    }
                    String providerURL = url.toFullString();
                    if (logger.isInfoEnabled()) {
                        logger.info("Register dubbo service " + interfaceClass.getName() + " url " + providerURL + " to registry " + registryURL);
                    }
View Full Code Here

              List<URL> us = loadRegistries();
              if (us != null && us.size() > 0) {
                  for (URL u : us) {
                      URL monitorUrl = loadMonitor(u);
                        if (monitorUrl != null) {
                            map.put(Constants.MONITOR_KEY, URL.encode(monitorUrl.toFullString()));
                        }
                      urls.add(u.addParameterAndEncoded(Constants.REFER_KEY, StringUtils.toQueryString(map)));
                    }
              }
              if (urls == null || urls.size() == 0) {
View Full Code Here

            if (registryURLs != null && registryURLs.size() > 0
                    && url.getParameter("register", true)) {
                for (URL registryURL : registryURLs) {
                    URL monitorUrl = loadMonitor(registryURL);
                    if (monitorUrl != null) {
                        url = url.addParameterAndEncoded(Constants.MONITOR_KEY, monitorUrl.toFullString());
                    }
                    String providerURL = url.toFullString();
                    if (logger.isInfoEnabled()) {
                        logger.info("Register dubbo service " + interfaceClass.getName() + " url " + providerURL + " to registry " + registryURL);
                    }
View Full Code Here

                          && url.getParameter("register", true)) {
                      for (URL registryURL : registryURLs) {
                          url = url.addParameterIfAbsent("dynamic", registryURL.getParameter("dynamic"));
                          URL monitorUrl = loadMonitor(registryURL);
                          if (monitorUrl != null) {
                              url = url.addParameterAndEncoded(Constants.MONITOR_KEY, monitorUrl.toFullString());
                          }
                          if (logger.isInfoEnabled()) {
                              logger.info("Register dubbo service " + interfaceClass.getName() + " url " + url + " to registry " + registryURL);
                          }
                          Invoker<?> invoker = proxyFactory.getInvoker(ref, (Class) interfaceClass, registryURL.addParameterAndEncoded(Constants.EXPORT_KEY, url.toFullString()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.