Package cn.bran.play.routing

Examples of cn.bran.play.routing.RouterClass


      long start = System.nanoTime();
      boolean ctxChanged = this.ctxPath != Play.ctxPath;

      for (ApplicationClass ac : Play.classes.all()) {
        // check cache
        RouterClass r = routerCache.get(ac.name);
        if (r != null && !ctxChanged && r.matchHash(ac.sigChecksum)) {
          // no change
          // JapidFlags.debug(ac.name + " has not changed. ");
        } else {
          Class<?> javaClass = ac.javaClass;
          if (javaClass != null 
              && javaClass.getName().startsWith("controllers.")
              && javaClass.getAnnotation(AutoPath.class) != null) {
            JapidFlags.debug("generate route for: " + ac.name);
            r = new RouterClass(javaClass, appPath, ac.sigChecksum);
          } else
            continue;
        }

        this.routerCache.put(ac.name, r);
        newRoutes.addAll(r.buildRoutes());
      }
      //
      JapidFlags.debug("rebuilding auto paths took(/ms): " + StringUtils.durationInMsFromNanos(start, System.nanoTime()));

      this.recentAddedRoutes = new ArrayList<Route>(newRoutes);
View Full Code Here

TOP

Related Classes of cn.bran.play.routing.RouterClass

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.