class RequestInterceptorProcessor extends ProcessorBase {

    @Override
    public void process(final WilmaHttpEntity entity) throws ApplicationException {
        Map<String, StubDescriptor> stubDescriptors = routingService.getStubDescriptors();
        for (String groupName : stubDescriptors.keySet()) {
            StubDescriptor stubDescriptor = stubDescriptors.get(groupName);
            List<InterceptorDescriptor> interceptorDescriptors = stubDescriptor.getInterceptorDescriptors();
            for (InterceptorDescriptor interceptorDescriptor : interceptorDescriptors) {
                RequestInterceptor interceptor = interceptorDescriptor.getRequestInterceptor();
                callInterceptor(interceptor, entity, interceptorDescriptor);
            }
        }
    }

}