Class StreamUtils

java.lang.Object
org.axonframework.common.stream.StreamUtils

public abstract class StreamUtils extends Object
Utility class for working with Streams.
  • Method Details

    • asStream

      public static <M> Stream<M> asStream(BlockingStream<M> messageStream)
      Convert the given messageStream to a regular java Stream. 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 this Stream will close the underling messageStream as well.
      Type Parameters:
      M - The type of entry contained in the stream
      Parameters:
      messageStream - the input TrackingEventStream
      Returns:
      the output Stream after conversion