@Override protected List<RequestHandler> createRequestHandlers() throws ServiceException { List<RequestHandler> handlers = super.createRequestHandlers(); handlers.add(new PortletUIInitHandler()); handlers.add(new PortletListenerNotifier()); handlers.add(0, new PortletDummyRequestHandler()); handlers.add(0, new PortletBootstrapHandler()); handlers.add(0, new PortletStateAwareRequestHandler()); return handlers; }
@Override protected List<RequestHandler> createRequestHandlers() throws ServiceException { List<RequestHandler> handlers = super.createRequestHandlers(); handlers.add(0, new ServletBootstrapHandler()); handlers.add(new ServletUIInitHandler()); if (isAtmosphereAvailable()) { try { handlers.add(new PushRequestHandler(this)); } catch (ServiceException e) { // Atmosphere init failed. Push won't work but we don't throw a // service exception as we don't want to prevent non-push // applications from working getLogger().log(Level.WARNING, "Error initializing Atmosphere. Push will not work.", e); } } return handlers; }
/** * Initializes this service. The service should be initialized before it is * used. * * @since 7.1 * @throws ServiceException * if a problem occurs when creating the service */ public void init() throws ServiceException { List<RequestHandler> handlers = createRequestHandlers(); ServiceInitEvent event = new ServiceInitEvent(this); Iterator<VaadinServiceInitListener> initListeners = getServiceInitListeners(); while (initListeners.hasNext()) { initListeners.next().serviceInit(event); } handlers.addAll(event.getAddedRequestHandlers()); Collections.reverse(handlers); requestHandlers = Collections.unmodifiableCollection(handlers); dependencyFilters = Collections.unmodifiableCollection( initDependencyFilters(event.getAddedDependencyFilters())); connectorIdGenerator = initConnectorIdGenerator( event.getAddedConnectorIdGenerators()); assert connectorIdGenerator != null; initialized = true; }
/** * Initializes this service. The service should be initialized before it is * used. * * @since 7.1 * @throws ServiceException * if a problem occurs when creating the service */ public void init() throws ServiceException { List<RequestHandler> handlers = createRequestHandlers(); Collections.reverse(handlers); requestHandlers = Collections.unmodifiableCollection(handlers); DeploymentConfiguration deploymentConf = getDeploymentConfiguration(); String routerConfiguratorClassName = deploymentConf .getRouterConfiguratorClassName(); if (routerConfiguratorClassName != null && !RouterConfigurator.class .getName().equals(routerConfiguratorClassName)) { // Configure router if we have a non-default configurator type configureRouter(routerConfiguratorClassName); } initialized = true; }
@Override protected List<RequestHandler> createRequestHandlers() throws ServiceException { List<RequestHandler> handlers = super.createRequestHandlers(); handlers.add(0, new BootstrapHandler()); if (isAtmosphereAvailable()) { try { handlers.add(new PushRequestHandler(this)); } catch (ServiceException e) { // Atmosphere init failed. Push won't work but we don't throw a // service exception as we don't want to prevent non-push // applications from working getLogger().log(Level.WARNING, "Error initializing Atmosphere. Push will not work.", e); } } return handlers; }