public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public String getText() { return DestinationPath.toString(prefixes); }
public static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
public String getText() { return DestinationPath.toString(prefixes); }
public boolean matches(ActiveMQDestination destination) { if (destination.getDestinationType() != destinationType) return false; String[] path = DestinationPath.getDestinationPaths(destination); int length = prefixes.length; if (path.length == length) { for (int i = 0; i < length; i++) { String prefix = prefixes[i]; if (prefix != null && !prefix.equals(path[i])) { return false; } } return true; } return false; }
protected ActiveMQDestination convertDestination(ActiveMQDestination destination) { if (destination != null && destination.getPhysicalName().contains(pathSeparator)) { List<String> l = new ArrayList<String>(); StringTokenizer iter = new StringTokenizer(destination.getPhysicalName(), pathSeparator); while (iter.hasMoreTokens()) { String name = iter.nextToken().trim(); if (name.length() == 0) { continue; } l.add(name); } String newName = DestinationPath.toString(l.toArray(new String[l.size()])); return ActiveMQDestination.createDestination(newName, destination.getDestinationType()); } else { return destination; } }
public static DestinationFilter parseFilter(ActiveMQDestination destination) { if (destination.isComposite()) { return new CompositeDestinationFilter(destination); } String[] paths = DestinationPath.getDestinationPaths(destination); int idx = paths.length - 1; if (idx >= 0) { String lastPath = paths[idx]; if (lastPath.equals(ANY_DESCENDENT)) { return new PrefixDestinationFilter(paths, destination.getDestinationType()); } else { while (idx >= 0) { lastPath = paths[idx--]; if (lastPath.equals(ANY_CHILD)) { return new WildcardDestinationFilter(paths, destination.getDestinationType()); } } } } // if none of the paths contain a wildcard then use equality return new SimpleDestinationFilter(destination); }
activeMQDestPaths.length - postfixPaths.length); ActiveMQTopic newTopic = new ActiveMQTopic(DestinationPath.toString(topicPath)); info.setDestination(newTopic);
public boolean matches(ActiveMQDestination destination) { if (destination.getDestinationType() != destinationType) return false; String[] path = DestinationPath.getDestinationPaths(destination.getPhysicalName()); int length = prefixes.length; if (path.length >= length) { int size = length - 1; for (int i = 0; i < size; i++) { if (!matches(prefixes[i],path[i])) { return false; } } return true; }else{ //want to look for the case where A matches A.> boolean match = true; for (int i = 0; (i < path.length && match); i++){ match = matches(prefixes[i], path[i]); } //paths get compacted - e.g. A.*.> will be compacted to A.> and by definition - the last element on //the prefix will be > if (match && prefixes.length == (path.length + 1)) { return true; } } return false; }
public String getText() { return DestinationPath.toString(prefixes); }
public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public String getText() { return DestinationPath.toString(prefixes); }
public static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
public String getText() { return DestinationPath.toString(prefixes); }
public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public String getText() { return DestinationPath.toString(prefixes); }
public boolean matches(ActiveMQDestination destination) { if (destination.getDestinationType() != destinationType) return false; String[] path = DestinationPath.getDestinationPaths(destination); int length = prefixes.length; if (path.length == length) { for (int i = 0; i < length; i++) { String prefix = prefixes[i]; if (prefix != null && !prefix.equals(path[i])) { return false; } } return true; } return false; }
public String getText() { return DestinationPath.toString(prefixes); }
public static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
public String getText() { return DestinationPath.toString(prefixes); }