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


Java Broker.getDestinations方法代码示例

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


在下文中一共展示了Broker.getDestinations方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sendToDestination

import org.apache.activemq.broker.Broker; //导入方法依赖的package包/类
private void sendToDestination(Broker broker, ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
    if (broker.getDestinations(destination).isEmpty()) {
        broker.getBrokerService().getRegionBroker().addDestination(broker.getAdminConnectionContext(), destination,true);   
    }

    for (Destination dest : broker.getDestinations(destination)) {
        logger.debug("Following search sending request to Destination " + dest.getName());
        dest.send(context, message.copy());
    }    
}
 
开发者ID:akarpe,项目名称:lab-projects,代码行数:11,代码来源:DynamicDestinationFilter.java

示例2: send

import org.apache.activemq.broker.Broker; //导入方法依赖的package包/类
/**
 * Sends a message to the given destination which may be a wildcard
 *
 * @param context broker context
 * @param message message to send
 * @param destination possibly wildcard destination to send the message to
 * @throws Exception on error
 */
protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
    Broker broker = context.getConnectionContext().getBroker();
    Set<Destination> destinations = broker.getDestinations(destination);

    for (Destination dest : destinations) {
        dest.send(context, message.copy());
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:17,代码来源:DestinationFilter.java

示例3: isPrioritizedMessageSubscriber

import org.apache.activemq.broker.Broker; //导入方法依赖的package包/类
public static boolean isPrioritizedMessageSubscriber(Broker broker,Subscription sub) {
    boolean result = false;
    Set<Destination> destinations = broker.getDestinations(sub.getActiveMQDestination());
    if (destinations != null) {
        for (Destination dest:destinations) {
            if (dest.isPrioritizedMessages()) {
                result = true;
                break;
            }
        }
    }
    return result;

}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:15,代码来源:AbstractPendingMessageCursor.java

示例4: send

import org.apache.activemq.broker.Broker; //导入方法依赖的package包/类
/**
 * Respect the selectors of the subscriptions to ensure only matched messages are dispatched to
 * the virtual queues, hence there is no build up of unmatched messages on these destinations
 */
@Override
protected void send(ProducerBrokerExchange context, Message message, ActiveMQDestination destination) throws Exception {
    Broker broker = context.getConnectionContext().getBroker();
    Set<Destination> destinations = broker.getDestinations(destination);

    for (Destination dest : destinations) {
        if (matchesSomeConsumer(broker, message, dest)) {
            dest.send(context, message.copy());
        }
    }
}
 
开发者ID:DiamondLightSource,项目名称:daq-eclipse,代码行数:16,代码来源:SelectorAwareVirtualTopicInterceptor.java


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