/** * Delegates to the frontend controller. * <p> * {@inheritDoc} */ @Override public void registerCommand(RemoteCommand command) { ((IRemoteCommandHandler) getFrontendController()).registerCommand(command); }
/** * Registers the controller in the http session. * <p> * {@inheritDoc} */ @Override public void start() { if (System.getProperty("java.security.auth.login.config") == null && HttpRequestHolder.isAvailable()) { System.setProperty("java.security.auth.login.config", ResourceProviderServlet.computeStaticUrl("conf/jaas.config")); } super.start(); if (HttpRequestHolder.isAvailable()) { HttpSession session = HttpRequestHolder.getServletRequest().getSession(); if (session != null) { session.setAttribute(RemotePeerRegistryServlet.PEER_REGISTRY, getFrontendController()); session.setAttribute(RemoteUtilServlet.REMOTE_STARTUP, this); } } }
/** * 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(); } }
protected RemoteMessageCommand createErrorMessageCommand() { IIconFactory<RIcon> iconFactory = getFrontendController().getViewFactory() .getIconFactory(); RemoteMessageCommand messageCommand = new RemoteMessageCommand(); messageCommand.setTitle(getFrontendController().getTranslation("error", getFrontendController().getLocale())); messageCommand.setTitleIcon(iconFactory.getErrorIcon(iconFactory .getTinyIconSize())); messageCommand.setMessageIcon(iconFactory.getErrorIcon(iconFactory .getLargeIconSize())); return messageCommand; }
try { Locale locale = LocaleUtils.toLocale(startCommand.getLanguage()); IFrontendController<RComponent, RIcon, RAction> controller = getFrontendController(); if (!dupSessionNotifiedOnce && isDupSessionDetectionEnabled() && controller != null && controller.isStarted()) { controller = getFrontendController(); if (startCommand.getVersion() != null && !isClientVersionCompatible(startCommand.getVersion())) {