Examples of UriMapping


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

 
 
  RouteMatcher matcher = new RouteMatcher();
 
  public void addRoute(String route, Class<StrestController> cls) {
    matcher.addMapping(new UriMapping(route, cls));
  }
View Full Code Here

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

  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
Copyright © 2018 www.massapi.com. 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.