gpt4 book ai didi

org.apache.activemq.artemis.core.config.WildcardConfiguration.getSingleWord()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 14:11:05 27 4
gpt4 key购买 nike

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

WildcardConfiguration.getSingleWord介绍

暂无

代码示例

代码示例来源:origin: apache/activemq-artemis

public String convert(String filter, WildcardConfiguration to) {
 return filter.replace(getDelimiter(), to.getDelimiter())
     .replace(getSingleWord(), to.getSingleWord())
     .replace(getAnyWords(), to.getAnyWords());
}

代码示例来源:origin: apache/activemq-artemis

/**
* @param e
* @return
*/
protected void parseWildcardConfiguration(final Element e, final Configuration mainConfig) {
 WildcardConfiguration conf = mainConfig.getWildcardConfiguration();
 conf.setDelimiter(getString(e, "delimiter", Character.toString(conf.getDelimiter()), Validators.NO_CHECK).charAt(0));
 conf.setAnyWords(getString(e, "any-words", Character.toString(conf.getAnyWords()), Validators.NO_CHECK).charAt(0));
 conf.setSingleWord(getString(e, "single-word", Character.toString(conf.getSingleWord()), Validators.NO_CHECK).charAt(0));
 conf.setRoutingEnabled(getBoolean(e, "enabled", conf.isRoutingEnabled()));
 conf.setRoutingEnabled(getBoolean(e, "routing-enabled", conf.isRoutingEnabled()));
}

代码示例来源:origin: apache/activemq-artemis

public AddressImpl(final SimpleString address, final WildcardConfiguration wildcardConfiguration) {
 this.address = address;
 this.wildcardConfiguration = wildcardConfiguration;
 addressParts = address.split(wildcardConfiguration.getDelimiter());
 containsWildCard = address.contains(wildcardConfiguration.getSingleWord()) || address.contains(wildcardConfiguration.getAnyWords());
}

代码示例来源:origin: apache/activemq-artemis

@Test
public void testWildcardConfiguration() throws Exception {
 FileConfigurationParser parser = new FileConfigurationParser();
 String configStr = firstPart + "<wildcard-addresses>\n<routing-enabled>true</routing-enabled>\n<delimiter>/</delimiter>\n<any-words>></any-words></wildcard-addresses>" + lastPart;
 ByteArrayInputStream input = new ByteArrayInputStream(configStr.getBytes(StandardCharsets.UTF_8));
 Configuration config = parser.parseMainConfig(input);
 WildcardConfiguration wildCard = config.getWildcardConfiguration();
 assertEquals('/', wildCard.getDelimiter());
 assertTrue(wildCard.isRoutingEnabled());
 assertEquals('>', wildCard.getAnyWords());
 assertEquals('*', wildCard.getSingleWord());
}

代码示例来源:origin: apache/activemq-artemis

final char sepSingleWord = wildcardConfiguration.getSingleWord();

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com