当前位置: 首页>>代码示例>>Java>>正文


Java ActiveMQDestination.TEMP_QUEUE_TYPE属性代码示例

本文整理汇总了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;
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:25,代码来源:BrokerComponent.java

示例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;
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:20,代码来源:KahaDBStore.java

示例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;
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:20,代码来源:TempKahaDBStore.java

示例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);
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:19,代码来源:BasicOpenWireTest.java

示例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);
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:19,代码来源:JmsTestSupport.java

示例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());
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:14,代码来源:AdvisorySupport.java

示例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);
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:14,代码来源:RegionBroker.java

示例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);
   }
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:14,代码来源:BasicOpenWireTest.java


注:本文中的org.apache.activemq.command.ActiveMQDestination.TEMP_QUEUE_TYPE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。