protected void startPippo(Pippo pippo) { pippo.start(); initRestAssured(); }
/** * Start the web server on this port. * * @param port */ public void start(int port) { getServer().setPort(port); start(); }
/** * Create a pippo instance, add a route on "/" that responds with a message. * * @param text * @return */ public static Pippo send(final String text) { Pippo pippo = new Pippo(); pippo.GET("/", routeContext -> routeContext.send(text)); pippo.start(); return pippo; }
@Override public void onEvent(ReloadWatcher.Event event, Path dir, Path path) { stop(); // TODO: very important (I cannot delete this block) try { Thread.sleep(5 * 1000); } catch (InterruptedException e) { // ignore } application = createApplication(); getServer().getPippoFilter().setApplication(application); start(); }
protected void startPippo(Pippo pippo) { pippo.start(); initRestAssured(); }