class FragmenterResource extends BaseResource {

    @GET
    @Path("getFragments")
    @Produces("application/json")
    public Response getFragments(@Context final ServletContext servletContext,
                                 @Context final HttpHeaders headers)
            throws Throwable {

        LOG.debug("Received FRAGMENTER call");
        startTime = System.currentTimeMillis();
        final RequestContext context = parseRequest(headers);
        final String path = context.getDataSource();
        final String fragmenterCacheKey = getFragmenterCacheKey(context);

        LOG.debug("FRAGMENTER started for path \"{}\"", path);

        List<Fragment> fragments;

        if (Utilities.isFragmenterCacheEnabled()) {
            try {
                // We can't support lambdas here because asm version doesn't support it
                fragments = fragmenterCacheFactory.getCache()
                        .get(fragmenterCacheKey, new Callable<List<Fragment>>() {
                            @Override
                            public List<Fragment> call() throws Exception {
                                didThreadProcessFragmentCall = true;
                                LOG.debug("Caching fragments for transactionId={} from segmentId={} with key={}",
                                        context.getTransactionId(), context.getSegmentId(), fragmenterCacheKey);
                                return getFragments(context);
                            }
                        });
            } catch (UncheckedExecutionException | ExecutionException e) {
                // Unwrap the error
                if (e.getCause() != null)
                    throw e.getCause();
                throw e;
            }

            if (!didThreadProcessFragmentCall) {
                logFragmentStatistics(Level.DEBUG, context, fragments);
            }
        } else {
            LOG.debug("Fragmenter cache is disabled");
            fragments = getFragments(context);
        }

        FragmentsResponse fragmentsResponse = FragmentsResponseFormatter.formatResponse(fragments, path);
        return Response.ok(fragmentsResponse, MediaType.APPLICATION_JSON_TYPE).build();
    }

    public  FragmenterResource();
      FragmenterResource(RequestParser<HttpHeaders> parser,
                       FragmenterFactory fragmenterFactory,
                       FragmenterCacheFactory fragmenterCacheFactory);

}