Package play.core.Router

Examples of play.core.Router.Routes


  protected List<Tuple3<String, String, String>> getPlayRoutes() {
    play.api.Application realApp = _app.getWrappedApplication();
    Option<Routes> routes = realApp.routes();
    if (routes.isDefined()) {
      Routes r = routes.get();
      Seq<Tuple3<String, String, String>> docs = r.documentation();
      return scala.collection.JavaConversions.seqAsJavaList(docs);
    }
    return null;
  }
View Full Code Here


        }
    }

    public static Result routeAndCall(Class<? extends Routes> router, FakeRequest fakeRequest, long timeout) {
        try {
            Routes routes = (Routes) router.getClassLoader().loadClass(router.getName() + "$").getDeclaredField("MODULE$").get(null);
            if(routes.routes().isDefinedAt(fakeRequest.getWrappedRequest())) {
                return invokeHandler(routes.routes().apply(fakeRequest.getWrappedRequest()), fakeRequest, timeout);
            } else {
                return null;
            }
        } catch(RuntimeException e) {
            throw e;
View Full Code Here

TOP

Related Classes of play.core.Router.Routes

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.