protected void runAsync(AsyncRunner.AsyncTask asyncTask) { ClientApp.make().getAsyncRunner().runAsync(asyncTask); }
@Override public void routeRequest(final PresenterCommand presenterCommand) { ClientApp.make().getAsyncRunner().runAsync(new AsyncRunner.AsyncTask() { @Override public void onSuccess() { requestEventFactory.make(presenterCommand).fire(); } @Override public void onFailed(Throwable error) { LOGGER.error("Could not RunAsync request [" + presenterCommand + "]", error); } }); } }
public void fireEvent(Class<? extends DominoEvent> extensionPointInterface, DominoEvent dominoEvent) { LISTENERS_REPOSITORY_HOLDER.attribute.getEventListeners(extensionPointInterface) .forEach(c -> getAsyncRunner().runAsync(() -> c.listen(dominoEvent))); }
@SuppressWarnings("rawtypes") @Override public final void send(final ServerRequest request) { ClientApp.make().getAsyncRunner().runAsync(new RequestAsyncTask(request)); }
private void inform(String token, String title, String stateJson) { listeners.stream().filter(l -> { return l.tokenFilter.filter(new DominoHistoryState(token, title, stateJson).token); }) .forEach(l -> ClientApp.make().getAsyncRunner().runAsync(() -> l.listener.onPopState(new DominoHistoryState(token, title, stateJson)))); }