public static ActiveMQDestination[] getDurableTopicDestinations(final Set<ActiveMQDestination> durableDestinations) { if (durableDestinations != null) { HashSet<ActiveMQDestination> topics = new HashSet<ActiveMQDestination>(); for (ActiveMQDestination d : durableDestinations) { if( d.isTopic() ) { topics.add(d); } } ActiveMQDestination[] dest = new ActiveMQDestination[topics.size()]; dest = topics.toArray(dest); return dest; } return null; }
@Override protected Set<ActiveMQDestination> getInactiveDestinations() { Set<ActiveMQDestination> inactiveDestinations = super.getInactiveDestinations(); for (Iterator<ActiveMQDestination> iter = inactiveDestinations.iterator(); iter.hasNext();) { ActiveMQDestination dest = iter.next(); if (!dest.isTopic()) { iter.remove(); } } return inactiveDestinations; }
/** * Retrieve a set of all Topics be used by the Broker * @return all Topics */ public Set<ActiveMQTopic> getTopics(){ Set<ActiveMQTopic> result = new HashSet<ActiveMQTopic>(); for (ActiveMQDestination destination:getDestinations()){ if (destination.isTopic() && !destination.isTemporary()){ result.add((ActiveMQTopic) destination); } } return result; }
/** * Retrieve a set of all TemporaryTopics be used by the Broker * @return all TemporaryTopics */ public Set<ActiveMQTempTopic> getTempTopics(){ Set<ActiveMQTempTopic> result = new HashSet<ActiveMQTempTopic>(); for (ActiveMQDestination destination:getDestinations()){ if (destination.isTopic() && destination.isTemporary()){ result.add((ActiveMQTempTopic) destination); } } return result; }
/** * @return true of the destination is a Topic */ @Override public boolean isDestinationTopic() { ConsumerInfo info = getConsumerInfo(); if (info != null) { ActiveMQDestination dest = info.getDestination(); return dest.isTopic(); } return false; }
/** * @return true if this is a durable topic subscriber */ public boolean isDurableSubscriber() { return info.getSubscriptionName() != null && info.getDestination().isTopic(); }
public static boolean isConsumerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isConsumerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(CONSUMER_ADVISORY_TOPIC_PREFIX); } }
public static boolean isSlowConsumerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isSlowConsumerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(SLOW_CONSUMER_TOPIC_PREFIX); } }
public static boolean isMessageConsumedAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isMessageConsumedAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_CONSUMED_TOPIC_PREFIX); } }
public static boolean isFullAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isFullAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(FULL_TOPIC_PREFIX); } }
public static boolean isNetworkBridgeAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isNetworkBridgeAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(NETWORK_BRIDGE_TOPIC_PREFIX); } }
public static boolean isProducerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isProducerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(PRODUCER_ADVISORY_TOPIC_PREFIX); } }
public static boolean isMessageDeliveredAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isMessageDeliveredAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_DELIVERED_TOPIC_PREFIX); } }
public static boolean isMessageDiscardedAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isMessageDiscardedAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(MESSAGE_DISCAREDED_TOPIC_PREFIX); } }
public static boolean isVirtualDestinationConsumerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isVirtualDestinationConsumerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(VIRTUAL_DESTINATION_CONSUMER_ADVISORY_TOPIC_PREFIX); } }
public static boolean isFastProducerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isFastProducerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(FAST_PRODUCER_TOPIC_PREFIX); } }
public static boolean isMasterBrokerAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isMasterBrokerAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(MASTER_BROKER_TOPIC_PREFIX); } }
private boolean isDuplicateSuppressionOff(final ConsumerInfo consumerInfo) { return !configuration.isSuppressDuplicateQueueSubscriptions() && !configuration.isSuppressDuplicateTopicSubscriptions() || consumerInfo.getDestination().isQueue() && !configuration.isSuppressDuplicateQueueSubscriptions() || consumerInfo.getDestination().isTopic() && !configuration.isSuppressDuplicateTopicSubscriptions(); }
private boolean canConduit(DemandSubscription ds) { return ds.isStaticallyIncluded() || ds.getRemoteInfo().getDestination().isTopic() || !ds.getRemoteInfo().isNetworkSubscription() || (ds.getRemoteInfo().getDestination().isQueue() && configuration.isConduitNetworkQueueSubscriptions()); }