Package ca.simplegames.micro.controllers

Examples of ca.simplegames.micro.controllers.ControllerManager.execute()


        Context<String> input = new MapContext<String>()
                .with(Rack.REQUEST_METHOD, "GET")
                .with(Rack.PATH_INFO, "/micro-logo.png");

        ControllerManager cm = micro.getSite().getControllerManager();
        cm.execute("allien.Controller", context);
    }

    /**
     * try to execute a controller that will generate an internal exception
     */
 
View Full Code Here


     */
    @Test(expected = ControllerException.class)
    public void testExceptionalController() throws Exception {

        ControllerManager cm = micro.getSite().getControllerManager();
        cm.execute("DivideByZero.bsh", new MicroContext<String>());
    }
}
View Full Code Here

                                repository.getLog().error(String.format("%s, error: %s", controllerName, e.getMessage()));
                                e.printStackTrace();
                                throw new ControllerException(e.getMessage());
                            }
                        } else {
                            controllerManager.execute(controllerName, context, (Map) controllerMap.get(Globals.OPTIONS));
                        }
                    }
                }
            }
        }
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.