本文整理汇总了Java中org.apache.activemq.command.ActiveMQDestination.TEMP_QUEUE_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQDestination.TEMP_QUEUE_TYPE属性的具体用法?Java ActiveMQDestination.TEMP_QUEUE_TYPE怎么用?Java ActiveMQDestination.TEMP_QUEUE_TYPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.activemq.command.ActiveMQDestination
的用法示例。
在下文中一共展示了ActiveMQDestination.TEMP_QUEUE_TYPE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createEndpoint
@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;
}
示例2: convert
KahaDestination convert(ActiveMQDestination dest) {
KahaDestination rc = new KahaDestination();
rc.setName(dest.getPhysicalName());
switch (dest.getDestinationType()) {
case ActiveMQDestination.QUEUE_TYPE:
rc.setType(DestinationType.QUEUE);
return rc;
case ActiveMQDestination.TOPIC_TYPE:
rc.setType(DestinationType.TOPIC);
return rc;
case ActiveMQDestination.TEMP_QUEUE_TYPE:
rc.setType(DestinationType.TEMP_QUEUE);
return rc;
case ActiveMQDestination.TEMP_TOPIC_TYPE:
rc.setType(DestinationType.TEMP_TOPIC);
return rc;
default:
return null;
}
}
示例3: convert
KahaDestination convert(ActiveMQDestination dest) {
KahaDestination rc = new KahaDestination();
rc.setName(dest.getPhysicalName());
switch( dest.getDestinationType() ) {
case ActiveMQDestination.QUEUE_TYPE:
rc.setType(DestinationType.QUEUE);
return rc;
case ActiveMQDestination.TOPIC_TYPE:
rc.setType(DestinationType.TOPIC);
return rc;
case ActiveMQDestination.TEMP_QUEUE_TYPE:
rc.setType(DestinationType.TEMP_QUEUE);
return rc;
case ActiveMQDestination.TEMP_TOPIC_TYPE:
rc.setType(DestinationType.TEMP_TOPIC);
return rc;
default:
return null;
}
}
示例4: createDestination
public ActiveMQDestination createDestination(Session session, byte type, String name) throws Exception {
if (name == null) {
return createDestination(session, type);
}
switch (type) {
case ActiveMQDestination.QUEUE_TYPE:
makeSureCoreQueueExist(name);
return (ActiveMQDestination) session.createQueue(name);
case ActiveMQDestination.TOPIC_TYPE:
return (ActiveMQDestination) session.createTopic(name);
case ActiveMQDestination.TEMP_QUEUE_TYPE:
return (ActiveMQDestination) session.createTemporaryQueue();
case ActiveMQDestination.TEMP_TOPIC_TYPE:
return (ActiveMQDestination) session.createTemporaryTopic();
default:
throw new IllegalArgumentException("type: " + type);
}
}
示例5: createDestination
protected ActiveMQDestination createDestination(Session session, byte type) throws JMSException {
String testMethod = getName();
if (testMethod.indexOf(" ") > 0) {
testMethod = testMethod.substring(0, testMethod.indexOf(" "));
}
String name = "TEST." + getClass().getName() + "." + testMethod + "." + TEST_COUNTER.getAndIncrement();
switch (type) {
case ActiveMQDestination.QUEUE_TYPE:
return (ActiveMQDestination) session.createQueue(name);
case ActiveMQDestination.TOPIC_TYPE:
return (ActiveMQDestination) session.createTopic(name);
case ActiveMQDestination.TEMP_QUEUE_TYPE:
return (ActiveMQDestination) session.createTemporaryQueue();
case ActiveMQDestination.TEMP_TOPIC_TYPE:
return (ActiveMQDestination) session.createTemporaryTopic();
default:
throw new IllegalArgumentException("type: " + type);
}
}
示例6: getDestinationAdvisoryTopic
public static ActiveMQTopic getDestinationAdvisoryTopic(ActiveMQDestination destination) {
switch (destination.getDestinationType()) {
case ActiveMQDestination.QUEUE_TYPE:
return QUEUE_ADVISORY_TOPIC;
case ActiveMQDestination.TOPIC_TYPE:
return TOPIC_ADVISORY_TOPIC;
case ActiveMQDestination.TEMP_QUEUE_TYPE:
return TEMP_QUEUE_ADVISORY_TOPIC;
case ActiveMQDestination.TEMP_TOPIC_TYPE:
return TEMP_TOPIC_ADVISORY_TOPIC;
default:
throw new RuntimeException("Unknown destination type: " + destination.getDestinationType());
}
}
示例7: getRegion
protected Region getRegion(ActiveMQDestination destination) throws JMSException {
switch (destination.getDestinationType()) {
case ActiveMQDestination.QUEUE_TYPE:
return queueRegion;
case ActiveMQDestination.TOPIC_TYPE:
return topicRegion;
case ActiveMQDestination.TEMP_QUEUE_TYPE:
return tempQueueRegion;
case ActiveMQDestination.TEMP_TOPIC_TYPE:
return tempTopicRegion;
default:
throw createUnknownDestinationTypeException(destination);
}
}
示例8: createDestination2
protected ActiveMQDestination createDestination2(Session session, byte type) throws JMSException {
switch (type) {
case ActiveMQDestination.QUEUE_TYPE:
return (ActiveMQDestination) session.createQueue(queueName2);
case ActiveMQDestination.TOPIC_TYPE:
return (ActiveMQDestination) session.createTopic(topicName2);
case ActiveMQDestination.TEMP_QUEUE_TYPE:
return (ActiveMQDestination) session.createTemporaryQueue();
case ActiveMQDestination.TEMP_TOPIC_TYPE:
return (ActiveMQDestination) session.createTemporaryTopic();
default:
throw new IllegalArgumentException("type: " + type);
}
}