/** * Delegates to the frontend controller. * <p> * {@inheritDoc} */ @Override public List<RemoteCommand> handleCommands(List<RemoteCommand> commands) { IFrontendController<RComponent, RIcon, RAction> controller = getFrontendController(); if (controller == null || !controller.isStarted()) { // we are on a brand new session instance. return Collections .singletonList((RemoteCommand) new RemoteRestartCommand()); } try { return ((IRemoteCommandHandler) controller).handleCommands(commands); } catch (Throwable ex) { controller.traceUnexpectedException(ex); return Collections.emptyList(); } }