Package io.micronaut.http.server.netty
Class HttpContentProcessorAsReactiveProcessor
java.lang.Object
io.micronaut.http.server.netty.HttpContentProcessorAsReactiveProcessor
Utility class for transforming a
Note: A more complicated, but possibly faster, implementation of this class is archived in the original PR.
NettyHttpRequest using a HttpContentProcessor
to a Publisher.Note: A more complicated, but possibly faster, implementation of this class is archived in the original PR.
- Since:
- 4.0.0
- Author:
- Jonas Konrad
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> @NonNull reactor.core.publisher.Flux<T>asPublisher(FormDataHttpContentProcessor processor, Publisher<io.netty.handler.codec.http.HttpContent> streamed) Subscribe to theStreamedHttpMessagein the given request, and return aPublisherthat will produce the processed items.
This exists mostly for compatibility with the oldHttpContentProcessor, which was aProcessor.
-
Method Details
-
asPublisher
@NonNull public static <T> @NonNull reactor.core.publisher.Flux<T> asPublisher(FormDataHttpContentProcessor processor, Publisher<io.netty.handler.codec.http.HttpContent> streamed) Subscribe to theStreamedHttpMessagein the given request, and return aPublisherthat will produce the processed items.
This exists mostly for compatibility with the oldHttpContentProcessor, which was aProcessor.- Type Parameters:
T- The output element type- Parameters:
processor- The content processor to usestreamed- The request to subscribe to- Returns:
- The publisher producing output data
-