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


Java ActiveMQDestination.QUEUE_TYPE属性代码示例

本文整理汇总了Java中org.apache.activemq.command.ActiveMQDestination.QUEUE_TYPE属性的典型用法代码示例。如果您正苦于以下问题:Java ActiveMQDestination.QUEUE_TYPE属性的具体用法?Java ActiveMQDestination.QUEUE_TYPE怎么用?Java ActiveMQDestination.QUEUE_TYPE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.activemq.command.ActiveMQDestination的用法示例。


在下文中一共展示了ActiveMQDestination.QUEUE_TYPE属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getACLs

protected Set<GroupPrincipal> getACLs(ActiveMQDestination destination, String roleBase, String roleAttribute) {
    try {
        context = open();
    } catch (NamingException e) {
        LOG.error(e.toString());
        return new HashSet<GroupPrincipal>();
    }



    String destinationBase = "";
    SearchControls constraints = new SearchControls();
    if (AdvisorySupport.isAdvisoryTopic(destination) && useAdvisorySearchBase) {
        destinationBase = advisorySearchBase;
    } else {
        if ((destination.getDestinationType() & ActiveMQDestination.QUEUE_TYPE) == ActiveMQDestination.QUEUE_TYPE) {
            destinationBase = queueSearchMatchingFormat.format(new String[]{destination.getPhysicalName()});
            if (queueSearchSubtreeBool) {
                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
            } else {
                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
            }
        }
        if ((destination.getDestinationType() & ActiveMQDestination.TOPIC_TYPE) == ActiveMQDestination.TOPIC_TYPE) {
            destinationBase = topicSearchMatchingFormat.format(new String[]{destination.getPhysicalName()});
            if (topicSearchSubtreeBool) {
                constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
            } else {
                constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
            }
        }
    }

    constraints.setReturningAttributes(new String[] {roleAttribute});

    return getACLs(destinationBase, constraints, roleBase, roleAttribute);
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:37,代码来源:LDAPAuthorizationMap.java

示例7: 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

示例8: 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

示例9: 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

示例10: createView

protected DestinationViewMBean createView(String broker, String destination, byte type) throws Exception {
   String domain = "org.apache.activemq";
   ObjectName name;
   if (type == ActiveMQDestination.QUEUE_TYPE) {
      name = new ObjectName(domain + ":type=Broker,brokerName=" + broker + ",destinationType=Queue,destinationName=" + destination);
   } else {
      name = new ObjectName(domain + ":type=Broker,brokerName=" + broker + ",destinationType=Topic,destinationName=" + destination);
   }
   return (DestinationViewMBean) brokers.get(broker).broker.getManagementContext().newProxyInstance(name, DestinationViewMBean.class, true);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:10,代码来源:TwoBrokerTempQueueAdvisoryTest.java

示例11: getDestinationType

@Override
public byte getDestinationType() {
    return ActiveMQDestination.QUEUE_TYPE & ActiveMQDestination.TOPIC_TYPE;
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:4,代码来源:AnyDestination.java


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