You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/05/10 07:28:03 UTC
[GitHub] [james-project] chibenwa commented on a diff in pull request #902: JAMES-3719 Reactive textual content extraction with Apache Tika
chibenwa commented on code in PR #902:
URL: https://github.com/apache/james-project/pull/902#discussion_r868906129
##########
mailbox/api/src/main/java/org/apache/james/mailbox/extractor/TextExtractor.java:
##########
@@ -23,8 +23,14 @@
import org.apache.james.mailbox.model.ContentType;
+import reactor.core.publisher.Mono;
+
public interface TextExtractor {
ParsedContent extractContent(InputStream inputStream, ContentType contentType) throws Exception;
+ default Mono<ParsedContent> extractContentReactive(InputStream inputStream, ContentType contentType) {
+ return Mono.fromCallable(() -> extractContent(inputStream, contentType));
Review Comment:
Good question. In practice this is, with current implementation, a byte array input stream. But yes I will put that subscribeOn for the sake of genericity or we might regret it later.
Good catch!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org