RefCountingContentStorage (RefCountingContentStorage contents, List<ConnectionInterceptor> interceptors) { var contentInterceptors = interceptors.stream() .filter(ContentsInterceptor.class::isInstance) .map(ContentsInterceptor.class::cast) .toList(); return InterceptorInjection.INSTANCE.injectInContents(contents, contentInterceptors); }