Refine search
public static boolean isConnectionAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isConnectionAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.equals(CONNECTION_ADVISORY_TOPIC); } }
@SuppressWarnings({"rawtypes", "unchecked"}) public Set unsynchronizedGet(ActiveMQDestination key) { if (key.isComposite()) { ActiveMQDestination[] destinations = key.getCompositeDestinations(); Set answer = new HashSet(destinations.length); for (int i = 0; i < destinations.length; i++) { ActiveMQDestination childDestination = destinations[i]; Object value = unsynchronizedGet(childDestination); if (value instanceof Set) { answer.addAll((Set) value); } else if (value != null) { answer.add(value); } } return answer; } return findWildcardMatches(key); }
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); } }
public static boolean isAdvisoryTopic(ActiveMQDestination destination) { if (destination != null) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.isTopic() && destination.getPhysicalName().startsWith(ADVISORY_TOPIC_PREFIX); } } return false; }
public static boolean isTempDestinationAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (!isTempDestinationAdvisoryTopic(compositeDestinations[i])) { return false; } } return true; } else { return destination.equals(TEMP_QUEUE_ADVISORY_TOPIC) || destination.equals(TEMP_TOPIC_ADVISORY_TOPIC); } }
/** * @param key * @return */ @SuppressWarnings({"rawtypes", "unchecked"}) public Set removeAll(ActiveMQDestination key) { Set rc = new HashSet(); if (key.isComposite()) { ActiveMQDestination[] destinations = key.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { rc.add(removeAll(destinations[i])); } return rc; } String[] paths = key.getDestinationPaths(); getRootNode(key).removeAll(rc, paths, 0); return rc; }
public void unsynchronizedPut(ActiveMQDestination key, Object value) { if (key.isComposite()) { ActiveMQDestination[] destinations = key.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ActiveMQDestination childDestination = destinations[i]; put(childDestination, value); } return; } String[] paths = key.getDestinationPaths(); getRootNode(key).add(paths, 0, value); }
public void unsynchronizedRemove(ActiveMQDestination key, Object value) { if (key.isComposite()) { ActiveMQDestination[] destinations = key.getCompositeDestinations(); for (int i = 0; i < destinations.length; i++) { ActiveMQDestination childDestination = destinations[i]; remove(childDestination, value); } return; } String[] paths = key.getDestinationPaths(); getRootNode(key).remove(paths, 0, value); }
/** * Looks up the value(s) matching the given Destination key. For simple * destinations this is typically a List of one single value, for wildcards * or composite destinations this will typically be a Union of matching * values. * * @param key the destination to lookup * @return a Union of matching values or an empty list if there are no * matching values. */ @Override @SuppressWarnings("rawtypes") public synchronized Set get(ActiveMQDestination key) { if (key.isComposite()) { ActiveMQDestination[] destinations = key.getCompositeDestinations(); Set answer = null; for (int i = 0; i < destinations.length; i++) { ActiveMQDestination childDestination = destinations[i]; answer = union(answer, get(childDestination)); if (answer == null || answer.isEmpty()) { break; } } return answer; } return findWildcardMatches(key, false); }
public static boolean isDestinationAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isDestinationAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.equals(TEMP_QUEUE_ADVISORY_TOPIC) || destination.equals(TEMP_TOPIC_ADVISORY_TOPIC) || destination.equals(QUEUE_ADVISORY_TOPIC) || destination.equals(TOPIC_ADVISORY_TOPIC); } }