class ThingsSseRouteBuilder extends RouteDirectives implements SseRouteBuilder {

    @SuppressWarnings("squid:S1172") // allow unused ctx-Param in order to have a consistent route-"interface"
    @Override
    public Route build(final RequestContext ctx, final Supplier<CompletionStage<DittoHeaders>> dittoHeadersSupplier) {
        return concat(
                rawPathPrefix(PathMatchers.slash().concat(PATH_THINGS),
                        () -> pathEndOrSingleSlash(() -> get(() -> headerValuePF(ACCEPT_HEADER_EXTRACTOR,
                                accept -> {
                                    final CompletionStage<DittoHeaders> dittoHeadersCompletionStage =
                                            dittoHeadersSupplier.get()
                                                    .thenApply(ThingsSseRouteBuilder::getDittoHeadersWithCorrelationId);
                                    return buildThingsSseRoute(ctx, dittoHeadersCompletionStage);
                                })))),
                buildSearchSseRoute(ctx, dittoHeadersSupplier)
        );
    }

    private  ThingsSseRouteBuilder(final ActorRef streamingActor,
            final StreamingConfig streamingConfig,
            final QueryFilterCriteriaFactory queryFilterCriteriaFactory,
            final ActorRef pubSubMediator);

}