/** * Creates a search presenter. * * @param model model to present * @param view view to render into * @param actionHandler handler for actions * @param profileEventsDispatcher the dispatcher of profile events. */ public static SearchPresenter create( Search model, SearchPanelView view, WaveActionHandler actionHandler, SourcesEvents<ProfileListener> profileEventsDispatcher) { SearchPresenterResources.Css css = SearchPresenterResources.Loader.res.css(); SearchPresenter presenter = new SearchPresenter( css, SchedulerInstance.getHighPriorityTimer(), model, view, actionHandler, profileEventsDispatcher); presenter.init(); return presenter; }
private void loadStageTwo(final StageOne one) { final Timer timer = Timing.start("Stage Two"); SchedulerInstance.getHighPriorityTimer() .schedule( new Scheduler.Task() { @Override public void execute() { createStageTwoLoader(one) .call( new Accessor<StageTwo>() { @Override public void use(StageTwo x) { Timing.stop(timer); loadStageThree(x); } }); } }); }
private void loadStageThree(final StageTwo two) { final Timer timer = Timing.start("Stage Tree"); SchedulerInstance.getHighPriorityTimer() .schedule( new Scheduler.Task() { @Override public void execute() { createStageThreeLoader(two) .call( new Accessor<StageThree>() { @Override public void use(StageThree x) { Timing.stop(timer); finish(); } }); } }); }