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
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.reactivestreams.Publisher<T>asPublisher(HttpContentProcessor processor, NettyHttpRequest<?> request) 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
public static <T> org.reactivestreams.Publisher<T> asPublisher(HttpContentProcessor processor, NettyHttpRequest<?> request) 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 userequest- The request to subscribe to- Returns:
- The publisher producing output data
-