本文整理了Java中com.rabbitmq.client.Address.parseAddresses()
方法的一些代码示例,展示了Address.parseAddresses()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.parseAddresses()
方法的具体详情如下:
包路径:com.rabbitmq.client.Address
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!