Examples of routes()


Examples of er.rest.routes.ERXRouteRequestHandler.routes()

    ERXRouteRequestHandler restHandler = new ERXRouteRequestHandler();
    restHandler.addRoute(new ERXRoute(TaskInfo.ENTITY_NAME, "/taskInfos", ERXRoute.Method.Post, TaskInfoController.class, "create"));
    restHandler.addRoute(new ERXRoute(TaskInfo.ENTITY_NAME, "/taskInfos/{taskInfo:TaskInfo}", ERXRoute.Method.Get, TaskInfoController.class, "show"));
    restHandler.addRoute(new ERXRoute(TaskInfo.ENTITY_NAME, "/taskInfos/{taskInfo:TaskInfo}/results", ERXRoute.Method.Get, TaskInfoController.class, "results"));
    registerRequestHandler(restHandler, ERXRouteRequestHandler.Key)
    NSLog.out.appendln(restHandler.routes());
  }
 
  /**
   * @return shared standard ExecutorService provided by {@link Executors#newCachedThreadPool()}
   */
 
View Full Code Here

Examples of play.core.Router.Routes.routes()

    }

    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) {
View Full Code Here

Examples of play.core.Router.Routes.routes()

    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
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.