Class ComposedStreams


  • @Deprecated
    public final class ComposedStreams
    extends java.lang.Object
    Deprecated.
    Factory class which provides StreamIds that identify general purpose Publishers based on stream composition. This class is experimental.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static <X> StreamId<X> delayedStream​(StreamId<X> sourceStreamId, java.time.Duration duration)
      Deprecated.
      Creates a StreamId that will be used to create a Publisher which will re-emit all the items emitted by the Publishers identified by the provided StreamId with the specified delay.
      static <X> StreamId<X> filteredStream​(StreamId<X> sourceStreamId, java.util.function.Predicate<X> predicate)
      Deprecated.
      Creates a StreamId that will be used to create a Publisher which will filter and re-emit the items emitted by the Publishers identified by the provided StreamId.
      static <X,​T>
      StreamId<T>
      flatMappedStream​(StreamId<X> sourceStreamId, java.util.function.Function<X,​org.reactivestreams.Publisher<T>> conversion)
      Deprecated.
      EXPERIMENTAL Creates a StreamId that will identify a Publisher which will emit items based on a Publisher identified by the provided StreamId.
      static <X,​T>
      StreamId<T>
      mappedStream​(StreamId<X> sourceStreamId, java.util.function.Function<X,​T> conversion)
      Deprecated.
      Creates a StreamId that will be used to create a Publisher which will emit items based on a Publisher identified by the provided StreamId.
      static <X> StreamId<X> mergedStream​(java.util.List<StreamId<X>> sourceStreamIds)
      Deprecated.
      EXPERIMENTAL Creates a StreamId that will be used to create a Publisher which will emit all the items emitted by the Publishers identified by the provided StreamIds.
      static <X,​T>
      StreamId<T>
      zippedStream​(StreamId<X> sourceStreamId1, StreamId<X> sourceStreamId2, java.util.function.BiFunction<X,​X,​java.util.Optional<T>> zip)
      Deprecated.
      EXPERIMENTAL Creates a StreamId that will identify a Publisher which will emit items generated using the provided method and the values emitted by the Publishers identified by the provided StreamId s.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mappedStream

        public static final <X,​T> StreamId<T> mappedStream​(StreamId<X> sourceStreamId,
                                                                 java.util.function.Function<X,​T> conversion)
        Deprecated.
        Creates a StreamId that will be used to create a Publisher which will emit items based on a Publisher identified by the provided StreamId. The conversion function always returns an Optional, if the value is present then it will be emitted, otherwise nothing will be emitted.
        Parameters:
        sourceStreamId - StreamId which identifies a Publisher that will be used as the source of the converted objects.
        conversion - Function used to convert the objects.
        Returns:
        A StreamId.
        Throws:
        java.lang.NullPointerException - If the provided source stream id or conversion function are null.
        See Also:
        MapCompositionFunction
      • flatMappedStream

        public static final <X,​T> StreamId<T> flatMappedStream​(StreamId<X> sourceStreamId,
                                                                     java.util.function.Function<X,​org.reactivestreams.Publisher<T>> conversion)
        Deprecated.
        EXPERIMENTAL Creates a StreamId that will identify a Publisher which will emit items based on a Publisher identified by the provided StreamId. The conversion function always returns a Publisher which will used as the source of the objects to be flattened, if the stream emits values then these will be emitted, otherwise nothing will be emitted.
        Parameters:
        sourceStreamId - StreamId which identifies the Publisher that will be used as the source of the converted objects.
        conversion - Function used to convert the objects.
        Returns:
        A StreamId.
        Throws:
        java.lang.NullPointerException - If the provided source stream id or conversion function are null.
        See Also:
        FlatMapCompositionFunction
      • mergedStream

        public static final <X> StreamId<X> mergedStream​(java.util.List<StreamId<X>> sourceStreamIds)
        Deprecated.
        EXPERIMENTAL Creates a StreamId that will be used to create a Publisher which will emit all the items emitted by the Publishers identified by the provided StreamIds.
        Parameters:
        sourceStreamIds - List of StreamIds which identify Publishers that will be used as the source of the new Publisher.
        Returns:
        A StreamId.
        Throws:
        java.lang.IllegalArgumentException - If the provided list of source stream ids is null or empty.
        See Also:
        Flowable.merge(Iterable)
      • filteredStream

        public static final <X> StreamId<X> filteredStream​(StreamId<X> sourceStreamId,
                                                           java.util.function.Predicate<X> predicate)
        Deprecated.
        Creates a StreamId that will be used to create a Publisher which will filter and re-emit the items emitted by the Publishers identified by the provided StreamId.
        Parameters:
        sourceStreamId - StreamId which identifies the Publisher that will be used as the source of the filtered objects.
        predicate - Predicate that will be used to filter the items emitted by the source.
        Returns:
        A StreamId.
        Throws:
        java.lang.NullPointerException - If the provided source stream id or predicate are null.
        See Also:
        FilterCompositionFunction
      • delayedStream

        public static final <X> StreamId<X> delayedStream​(StreamId<X> sourceStreamId,
                                                          java.time.Duration duration)
        Deprecated.
        Creates a StreamId that will be used to create a Publisher which will re-emit all the items emitted by the Publishers identified by the provided StreamId with the specified delay.
        Parameters:
        sourceStreamId - StreamId which identifies the Publisher that will be used as the source of the emitted objects.
        duration - Duration that will be used as the delay before re-emitting.
        Returns:
        A StreamId.
        Throws:
        java.lang.NullPointerException - If the provided source stream id or duration are null.
        See Also:
        DelayCompositionFunction
      • zippedStream

        public static final <X,​T> StreamId<T> zippedStream​(StreamId<X> sourceStreamId1,
                                                                 StreamId<X> sourceStreamId2,
                                                                 java.util.function.BiFunction<X,​X,​java.util.Optional<T>> zip)
        Deprecated.
        EXPERIMENTAL Creates a StreamId that will identify a Publisher which will emit items generated using the provided method and the values emitted by the Publishers identified by the provided StreamId s. The zip function always returns an Optional, if the value is present then it will be emitted, otherwise nothing will be emitted.
        Parameters:
        sourceStreamId1 - StreamId which identifies the Publisher that will be used as the source of the objects used by the zip function.
        sourceStreamId2 - StreamId which identifies the Publisher that will be used as the source of the objects used by the zip function.
        zip - A BiFunction which will merge both objects into a single new instance of type T.
        Returns:
        A StreamId.
        Throws:
        java.lang.NullPointerException - If any of the provided source stream ids or zip function are null.
        See Also:
        ZipCompositionFunction