Package com.trendrr.strest.server.routing

Examples of com.trendrr.strest.server.routing.RouteMatcher


 
 
  @Test
  public void testRoutes() {
   
    RouteMatcher tree = new RouteMatcher();
   
   
    tree.addMapping(new UriMapping("/", HelloWorld.class));
    tree.addMapping(new UriMapping("/test", HelloWorld.class));
    tree.addMapping(new UriMapping("/test/*filenames", HelloWorld.class));
    tree.addMapping(new UriMapping("/test/:id", HelloWorld.class));
    tree.addMapping(new UriMapping("/test/:name/:id", HelloWorld.class));
    tree.addMapping(new UriMapping("/test/idmatch/:id", HelloWorld.class));
    tree.addMapping(new UriMapping("/test/idmatch/namematch", HelloWorld.class));
   
    /*
     * Notes on matching:
     *
     * matched route allways strips leading /
View Full Code Here

TOP

Related Classes of com.trendrr.strest.server.routing.RouteMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.