class EverrestProcessor implements Lifecycle {

    public void process(GenericContainerRequest request, GenericContainerResponse response, EnvironmentContext environmentContext)
            throws IOException {

        EnvironmentContext.setCurrent(environmentContext);

        ApplicationContext context = anApplicationContext()
                .withRequest(request)
                .withResponse(response)
                .withProviders(requestHandler.getProviders())
                .withProperties(properties)
                .withApplication(everrestApplication)
                .withConfiguration(new EverrestConfiguration(configuration))
                .withDependencySupplier(dependencySupplier)
                .withMethodInvokerDecoratorFactory(methodInvokerDecoratorFactory)
                .build();
        try {
            context.start();
            ApplicationContext.setCurrent(context);
            if (configuration.isNormalizeUri()) {
                normalizeRequestUri(request);
            }
            if (configuration.isHttpMethodOverride()) {
                overrideHttpMethod(request);
            }
            requestHandler.handleRequest(request, response);
        } finally {
            try {
                context.stop();
            } finally {
                ApplicationContext.setCurrent(null);
            }
            EnvironmentContext.setCurrent(null);
        }
    }

    public  EverrestProcessor(DependencySupplier dependencySupplier, RequestHandler requestHandler);
    public  EverrestProcessor(EverrestConfiguration configuration, DependencySupplier dependencySupplier, RequestHandler requestHandler, Application application);

}