本文整理汇总了Java中org.apache.camel.component.jms.JmsConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java JmsConfiguration类的具体用法?Java JmsConfiguration怎么用?Java JmsConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JmsConfiguration类属于org.apache.camel.component.jms包,在下文中一共展示了JmsConfiguration类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testTemporaryDestinationTypes
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Test
public void testTemporaryDestinationTypes() throws Exception {
JmsEndpoint endpoint = getMandatoryEndpoint("activemq:test.queue", JmsEndpoint.class);
JmsConfiguration configuration = endpoint.getConfiguration();
JmsProviderMetadata providerMetadata = configuration.getProviderMetadata();
assertNotNull("provider", providerMetadata);
Class<? extends TemporaryQueue> queueType = endpoint.getTemporaryQueueType();
Class<? extends TemporaryTopic> topicType = endpoint.getTemporaryTopicType();
log.info("Found queue type: " + queueType);
log.info("Found topic type: " + topicType);
assertNotNull("queueType", queueType);
assertNotNull("topicType", topicType);
assertEquals("queueType", ActiveMQTempQueue.class, queueType);
assertEquals("topicType", ActiveMQTempTopic.class, topicType);
}
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:JmsProviderTest.java
示例2: createEndpoint
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
BrokerConfiguration brokerConfiguration = new BrokerConfiguration();
setProperties(brokerConfiguration, parameters);
byte destinationType = ActiveMQDestination.QUEUE_TYPE;
if (remaining.startsWith(JmsConfiguration.QUEUE_PREFIX)) {
remaining = removeStartingCharacters(remaining.substring(JmsConfiguration.QUEUE_PREFIX.length()), '/');
} else if (remaining.startsWith(JmsConfiguration.TOPIC_PREFIX)) {
destinationType = ActiveMQDestination.TOPIC_TYPE;
remaining = removeStartingCharacters(remaining.substring(JmsConfiguration.TOPIC_PREFIX.length()), '/');
} else if (remaining.startsWith(JmsConfiguration.TEMP_QUEUE_PREFIX)) {
destinationType = ActiveMQDestination.TEMP_QUEUE_TYPE;
remaining = removeStartingCharacters(remaining.substring(JmsConfiguration.TEMP_QUEUE_PREFIX.length()), '/');
} else if (remaining.startsWith(JmsConfiguration.TEMP_TOPIC_PREFIX)) {
destinationType = ActiveMQDestination.TEMP_TOPIC_TYPE;
remaining = removeStartingCharacters(remaining.substring(JmsConfiguration.TEMP_TOPIC_PREFIX.length()), '/');
}
ActiveMQDestination destination = ActiveMQDestination.createDestination(remaining, destinationType);
BrokerEndpoint brokerEndpoint = new BrokerEndpoint(uri, this, destination, brokerConfiguration);
return brokerEndpoint;
}
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:26,代码来源:BrokerComponent.java
示例3: newAMQInstance
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
public static ActiveMQComponent newAMQInstance(){
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
connectionFactory.setBrokerURL("vm:localhost");
// use a pooled connection factory between the module and the queue
PooledConnectionFactory pooledConnectionFactory = new PooledConnectionFactory(connectionFactory);
// how many connections should there be in the session pool?
pooledConnectionFactory.setMaxConnections(100);
pooledConnectionFactory.setMaximumActiveSessionPerConnection(100);
pooledConnectionFactory.setCreateConnectionOnStartup(true);
pooledConnectionFactory.setBlockIfSessionPoolIsFull(false);
JmsConfiguration jmsConfiguration = new JmsConfiguration(pooledConnectionFactory);
jmsConfiguration.setDeliveryPersistent(false);
jmsConfiguration.setTimeToLive(1000*10);
ActiveMQComponent activeMQComponent = ActiveMQComponent.activeMQComponent("vm:localhost");
return activeMQComponent;
}
开发者ID:SignalK,项目名称:signalk-server-java,代码行数:19,代码来源:ActiveMqBrokerFactory.java
示例4: setConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Override
public void setConfiguration(JmsConfiguration configuration) {
if (configuration instanceof K8ActiveMQConfiguration) {
((K8ActiveMQConfiguration) configuration).setActiveMQComponent(this);
}
super.setConfiguration(configuration);
}
开发者ID:funktionio,项目名称:funktion-connectors,代码行数:8,代码来源:K8ActiveMQComponent.java
示例5: createConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Override
protected JmsConfiguration createConfiguration() {
K8ActiveMQConfiguration answer = new K8ActiveMQConfiguration();
answer.setBrokerURL("tcp://"+answer.getServiceName() + ":" + answer.getPort());
answer.setActiveMQComponent(this);
return answer;
}
开发者ID:funktionio,项目名称:funktion-connectors,代码行数:8,代码来源:K8ActiveMQComponent.java
示例6: setConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Override
public void setConfiguration(JmsConfiguration configuration) {
if (configuration instanceof ActiveMQConfiguration) {
((ActiveMQConfiguration) configuration).setActiveMQComponent(this);
}
super.setConfiguration(configuration);
}
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:8,代码来源:ActiveMQComponent.java
示例7: getConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
public JmsConfiguration getConfiguration() {
return configuration;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:JmsComponentConfiguration.java
示例8: setConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
public void setConfiguration(JmsConfiguration configuration) {
this.configuration = configuration;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:JmsComponentConfiguration.java
示例9: AMQPComponent
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
public AMQPComponent(JmsConfiguration configuration) {
super(configuration);
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:AMQPComponent.java
示例10: createConfiguration
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
@Override
protected JmsConfiguration createConfiguration() {
ActiveMQConfiguration answer = new ActiveMQConfiguration();
answer.setActiveMQComponent(this);
return answer;
}
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:7,代码来源:ActiveMQComponent.java
示例11: ActiveMQComponent
import org.apache.camel.component.jms.JmsConfiguration; //导入依赖的package包/类
public ActiveMQComponent(CamelContext camelContext, ConnectionFactory connectionFactory) {
super(camelContext);
setConfiguration(new JmsConfiguration(connectionFactory));
}
开发者ID:apache,项目名称:servicemix,代码行数:5,代码来源:ActiveMQComponent.java
注:本文中的org.apache.camel.component.jms.JmsConfiguration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论