Search in sources :

Example 1 with DependencySupplier

use of org.everrest.core.DependencySupplier in project che by eclipse.

the class ServerContainerInitializeListener method getEverrestProcessor.

protected EverrestProcessor getEverrestProcessor(ServletContext servletContext) {
    final DependencySupplier dependencies = (DependencySupplier) servletContext.getAttribute(DependencySupplier.class.getName());
    final ResourceBinder resources = (ResourceBinder) servletContext.getAttribute(ResourceBinder.class.getName());
    final ProviderBinder providers = (ProviderBinder) servletContext.getAttribute(ApplicationProviderBinder.class.getName());
    final EverrestConfiguration copyOfEverrestConfiguration = new EverrestConfiguration(getEverrestConfiguration(servletContext));
    copyOfEverrestConfiguration.setProperty(EverrestConfiguration.METHOD_INVOKER_DECORATOR_FACTORY, WebSocketMethodInvokerDecoratorFactory.class.getName());
    final RequestHandlerImpl requestHandler = new RequestHandlerImpl(new RequestDispatcher(resources), providers);
    return new EverrestProcessor(copyOfEverrestConfiguration, dependencies, requestHandler, null);
}
Also used : ApplicationProviderBinder(org.everrest.core.impl.ApplicationProviderBinder) ProviderBinder(org.everrest.core.impl.ProviderBinder) EverrestConfiguration(org.everrest.core.impl.EverrestConfiguration) DependencySupplier(org.everrest.core.DependencySupplier) RequestHandlerImpl(org.everrest.core.impl.RequestHandlerImpl) ResourceBinder(org.everrest.core.ResourceBinder) EverrestProcessor(org.everrest.core.impl.EverrestProcessor) RequestDispatcher(org.everrest.core.impl.RequestDispatcher)

Aggregations

DependencySupplier (org.everrest.core.DependencySupplier)1 ResourceBinder (org.everrest.core.ResourceBinder)1 ApplicationProviderBinder (org.everrest.core.impl.ApplicationProviderBinder)1 EverrestConfiguration (org.everrest.core.impl.EverrestConfiguration)1 EverrestProcessor (org.everrest.core.impl.EverrestProcessor)1 ProviderBinder (org.everrest.core.impl.ProviderBinder)1 RequestDispatcher (org.everrest.core.impl.RequestDispatcher)1 RequestHandlerImpl (org.everrest.core.impl.RequestHandlerImpl)1