class EverrestInitializedListener implements ServletContextListener {

    void initializeEverrestComponents(EverrestServletContextInitializer initializer, ServletContext servletContext) {
        EverrestProcessor processor = initializer.createEverrestProcessor();
        processor.start();

        servletContext.setAttribute(EverrestProcessor.class.getName(), processor);
        servletContext.setAttribute(EverrestConfiguration.class.getName(), initializer.createConfiguration());
        servletContext.setAttribute(Application.class.getName(), processor.getApplication());
        servletContext.setAttribute(DependencySupplier.class.getName(), processor.getDependencySupplier());
        servletContext.setAttribute(ResourceBinder.class.getName(), processor.getResources());
        servletContext.setAttribute(ApplicationProviderBinder.class.getName(), processor.getProviders());
    }

}