com.weibo.api.motan.rpc.URL.toFullStr()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.weibo.api.motan.rpc.URL.toFullStr()方法的一些代码示例,展示了URL.toFullStr()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URL.toFullStr()方法的具体详情如下:
包路径:com.weibo.api.motan.rpc.URL
类名称:URL
方法名:toFullStr

URL.toFullStr介绍

暂无

代码示例

代码示例来源:origin: weibocom/motan

public CommandServiceManager(URL refUrl) {
  LoggerUtil.info("CommandServiceManager init url:" + refUrl.toFullStr());
  this.refUrl = refUrl;
  notifySet = new ConcurrentHashSet<NotifyListener>();
  groupServiceCache = new ConcurrentHashMap<String, List<URL>>();
}

代码示例来源:origin: weibocom/motan

LoggerUtil.info(String.format("[ZookeeperRegistry] subscribe command: path=%s, info=%s", commandPath, url.toFullStr()));
} catch (Throwable e) {
  throw new MotanFrameworkException(String.format("Failed to subscribe %s to zookeeper(%s), cause: %s", url, getUrl(), e.getMessage()), e);

代码示例来源:origin: weibocom/motan

durl.setPort(Integer.parseInt(hostPort[1].trim()));
      durl.addParameter(URLParamType.nodeType.getName(), MotanConstants.NODE_TYPE_SERVICE);
      duBuf.append(StringTools.urlEncode(durl.toFullStr())).append(MotanConstants.COMMA_SEPARATOR);
url.addParameter(URLParamType.embed.getName(), StringTools.urlEncode(refUrl.toFullStr()));

代码示例来源:origin: weibocom/motan

LoggerUtil.info(String.format("[ZookeeperRegistry] subscribe service: path=%s, info=%s", ZkUtils.toNodePath(url, ZkNodeType.AVAILABLE_SERVER), url.toFullStr()));
} catch (Throwable e) {
  throw new MotanFrameworkException(String.format("Failed to subscribe %s to zookeeper(%s), cause: %s", url, getUrl(), e.getMessage()), e);

代码示例来源:origin: weibocom/motan

private void createNode(URL url, ZkNodeType nodeType) {
  String nodeTypePath = ZkUtils.toNodeTypePath(url, nodeType);
  if (!zkClient.exists(nodeTypePath)) {
    zkClient.createPersistent(nodeTypePath, true);
  }
  zkClient.createEphemeral(ZkUtils.toNodePath(url, nodeType), url.toFullStr());
}

代码示例来源:origin: weibocom/motan

u.addParameter(URLParamType.embed.getName(), StringTools.urlEncode(serviceUrl.toFullStr()));
registereUrls.add(u.createCopy());

代码示例来源:origin: weibocom/motan

/**
 * 根据服务的url生成consul对应的service
 *
 * @param url
 * @return
 */
public static ConsulService buildService(URL url) {
  ConsulService service = new ConsulService();
  service.setAddress(url.getHost());
  service.setId(ConsulUtils.convertConsulSerivceId(url));
  service.setName(ConsulUtils.convertGroupToServiceName(url.getGroup()));
  service.setPort(url.getPort());
  service.setTtl(ConsulConstants.TTL);
  List<String> tags = new ArrayList<String>();
  tags.add(ConsulConstants.CONSUL_TAG_MOTAN_PROTOCOL + url.getProtocol());
  tags.add(ConsulConstants.CONSUL_TAG_MOTAN_URL + StringTools.urlEncode(url.toFullStr()));
  service.setTags(tags);
  return service;
}

代码示例来源:origin: com.weibo/motan-registry-zookeeper

LoggerUtil.info(String.format("[ZookeeperRegistry] subscribe command: path=%s, info=%s", commandPath, url.toFullStr()));
} catch (Throwable e) {
  throw new MotanFrameworkException(String.format("Failed to subscribe %s to zookeeper(%s), cause: %s", url, getUrl(), e.getMessage()), e);

代码示例来源:origin: com.weibo/motan-registry-zookeeper

LoggerUtil.info(String.format("[ZookeeperRegistry] subscribe service: path=%s, info=%s", ZkUtils.toNodePath(url, ZkNodeType.AVAILABLE_SERVER), url.toFullStr()));
} catch (Throwable e) {
  throw new MotanFrameworkException(String.format("Failed to subscribe %s to zookeeper(%s), cause: %s", url, getUrl(), e.getMessage()), e);

代码示例来源:origin: com.weibo/motan-registry-zookeeper

private void createNode(URL url, ZkNodeType nodeType) {
  String nodeTypePath = ZkUtils.toNodeTypePath(url, nodeType);
  if (!zkClient.exists(nodeTypePath)) {
    zkClient.createPersistent(nodeTypePath, true);
  }
  zkClient.createEphemeral(ZkUtils.toNodePath(url, nodeType), url.toFullStr());
}

代码示例来源:origin: com.weibo/motan-registry-consul

/**
 * 根据服务的url生成consul对应的service
 *
 * @param url
 * @return
 */
public static ConsulService buildService(URL url) {
  ConsulService service = new ConsulService();
  service.setAddress(url.getHost());
  service.setId(ConsulUtils.convertConsulSerivceId(url));
  service.setName(ConsulUtils.convertGroupToServiceName(url.getGroup()));
  service.setPort(url.getPort());
  service.setTtl(ConsulConstants.TTL);
  List<String> tags = new ArrayList<String>();
  tags.add(ConsulConstants.CONSUL_TAG_MOTAN_PROTOCOL + url.getProtocol());
  tags.add(ConsulConstants.CONSUL_TAG_MOTAN_URL + StringTools.urlEncode(url.toFullStr()));
  service.setTags(tags);
  return service;
}

相关文章