Class HttpContentProcessorAsReactiveProcessor

java.lang.Object
io.micronaut.http.server.netty.HttpContentProcessorAsReactiveProcessor

@Internal public final class HttpContentProcessorAsReactiveProcessor extends Object
Utility class for transforming a 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 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 the StreamedHttpMessage in the given request, and return a Publisher that will produce the processed items.
      This exists mostly for compatibility with the old HttpContentProcessor, which was a Processor.
      Type Parameters:
      T - The output element type
      Parameters:
      processor - The content processor to use
      streamed - The request to subscribe to
      Returns:
      The publisher producing output data