@Override protected List<RequestHandler> createRequestHandlers() throws ServiceException { List<RequestHandler> handlers = super.createRequestHandlers(); handlers.add(0, new FaviconHandler()); 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().warn( "Error initializing Atmosphere. Push will not work.", e); } } return handlers; }
List<RequestHandler> handlers = createRequestHandlers();