public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
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 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); }
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 static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
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 static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
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 static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
public static String[] getDestinationPaths(ActiveMQDestination destination) { return getDestinationPaths(destination.getPhysicalName()); }
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 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 static String[] getDestinationPaths(Message message) throws JMSException { return getDestinationPaths(message.getDestination()); }
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 (!path[i].equals(ANY_CHILD) && !prefixes[i].equals(ANY_CHILD) && !prefixes[i].equals(path[i])) { return false; } } return true; } return false; }
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); }
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); }