com.rabbitmq.client.Address.parseAddresses()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(110)

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

Address.parseAddresses介绍

暂无

代码示例

代码示例来源:origin: org.apache.camel/camel-rabbitmq

/**
 * If this option is set, camel-rabbitmq will try to create connection based
 * on the setting of option addresses. The addresses value is a string which
 * looks like "server1:12345, server2:12345"
 */
public void setAddresses(String addresses) {
  Address[] addressArray = Address.parseAddresses(addresses);
  if (addressArray.length > 0) {
    this.addresses = addressArray;
  }
}

代码示例来源:origin: org.apache.camel/camel-rabbitmq

/**
 * If this option is set, camel-rabbitmq will try to create connection based
 * on the setting of option addresses. The addresses value is a string which
 * looks like "server1:12345, server2:12345"
 */
public void setAddresses(String addresses) {
  Address[] addressArray = Address.parseAddresses(addresses);
  if (addressArray.length > 0) {
    this.addresses = addressArray;
  }
}

代码示例来源:origin: net.jodah/lyra

/**
 * Sets the {@code addresses}.
 * 
 * @param addresses formatted as "host1[:port],host2[:port]", etc.
 * @throws NullPointerException if {@code addresses} is null
 */
public ConnectionOptions withAddresses(String addresses) {
 this.addresses = Address.parseAddresses(Assert.notNull(addresses, "addresses"));
 return this;
}

代码示例来源:origin: jhalterman/lyra

/**
 * Sets the {@code addresses}.
 * 
 * @param addresses formatted as "host1[:port],host2[:port]", etc.
 * @throws NullPointerException if {@code addresses} is null
 */
public ConnectionOptions withAddresses(String addresses) {
 this.addresses = Address.parseAddresses(Assert.notNull(addresses, "addresses"));
 return this;
}

代码示例来源:origin: spring-projects/spring-amqp

/**
 * Set addresses for clustering.
 * This property overrides the host+port properties if not empty.
 * @param addresses list of addresses with form "host[:port],..."
 */
public void setAddresses(String addresses) {
  if (StringUtils.hasText(addresses)) {
    Address[] addressArray = Address.parseAddresses(addresses);
    if (addressArray.length > 0) {
      this.addresses = addressArray;
      if (this.publisherConnectionFactory != null) {
        this.publisherConnectionFactory.setAddresses(addresses);
      }
      return;
    }
  }
  this.logger.info("setAddresses() called with an empty value, will be using the host+port properties for connections");
  this.addresses = null;
}

代码示例来源:origin: org.springframework.amqp/spring-rabbit

/**
 * Set addresses for clustering.
 * This property overrides the host+port properties if not empty.
 * @param addresses list of addresses with form "host[:port],..."
 */
public void setAddresses(String addresses) {
  if (StringUtils.hasText(addresses)) {
    Address[] addressArray = Address.parseAddresses(addresses);
    if (addressArray.length > 0) {
      this.addresses = addressArray;
      if (this.publisherConnectionFactory != null) {
        this.publisherConnectionFactory.setAddresses(addresses);
      }
      return;
    }
  }
  this.logger.info("setAddresses() called with an empty value, will be using the host+port properties for connections");
  this.addresses = null;
}

相关文章