Package org.axonframework.common.stream
Class StreamUtils
java.lang.Object
org.axonframework.common.stream.StreamUtils
Utility class for working with Streams.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <M> Stream<M> asStream(BlockingStream<M> messageStream) Convert the givenmessageStreamto a regular javaStream.
-
Method Details
-
asStream
Convert the givenmessageStreamto a regular javaStream. Note that the returned stream will block during iteration if the end of the stream is reached so take heed of this in production code. Closing thisStreamwill close the underlingmessageStreamas well.- Type Parameters:
M- The type of entry contained in the stream- Parameters:
messageStream- the inputTrackingEventStream- Returns:
- the output
Streamafter conversion
-