@Test public void testStraightMatch() throws Exception { Route route = new Route( "/queues/foo", null ); StompletActivator match = route.match( "/queues/bar" ); assertNull( match ); match = route.match( "/queues/foo" ); assertNotNull( match ); }
public StompletActivator match(String destination) { Matcher routeMatcher = this.regexp.matcher( destination ); if (routeMatcher.matches()) { Map<String, String> matches = new HashMap<String, String>(); for (int i = 0; i < this.segmentNames.length; ++i) { matches.put( segmentNames[i], routeMatcher.group( i + 1 ) ); } return new StompletActivator( this, destination, matches ); } return null; }
Route { public StompletActivator match(String destination) { Matcher routeMatcher = this.regexp.matcher( destination ); if (routeMatcher.matches()) { Map<String, String> matches = new HashMap<String, String>(); for (int i = 0; i < this.segmentNames.length; ++i) { matches.put( segmentNames[i], routeMatcher.group( i + 1 ) ); } return new StompletActivator( this, destination, matches ); } return null; } }
Route { public StompletActivator match(String destination) { Matcher routeMatcher = this.regexp.matcher( destination ); if (routeMatcher.matches()) { Map<String, String> matches = new HashMap<String, String>(); for (int i = 0; i < this.segmentNames.length; ++i) { matches.put( segmentNames[i], routeMatcher.group( i + 1 ) ); } return new StompletActivator( this, destination, matches ); } return null; } Route(String pattern, Stomplet stomplet); }
Route { public StompletActivator match(String destination) { Matcher routeMatcher = this.regexp.matcher( destination ); if (routeMatcher.matches()) { Map<String, String> matches = new HashMap<String, String>(); for (int i = 0; i < this.segmentNames.length; ++i) { matches.put( segmentNames[i], routeMatcher.group( i + 1 ) ); } return new StompletActivator( this, destination, matches ); } return null; } Route(String pattern, Stomplet stomplet); StompletActivator match(String destination); String getPatternString(); Stomplet getStomplet(); String toString(); }
Route { public StompletActivator match(String destination) { Matcher routeMatcher = this.regexp.matcher( destination ); if (routeMatcher.matches()) { Map<String, String> matches = new HashMap<String, String>(); for (int i = 0; i < this.segmentNames.length; ++i) { matches.put( segmentNames[i], routeMatcher.group( i + 1 ) ); } return new StompletActivator( this, destination, matches ); } return null; } Route(String pattern, Stomplet stomplet); StompletActivator match(String destination); String getPatternString(); Stomplet getStomplet(); String toString();  }