Class UniCombine


  • public class UniCombine
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      UniZip all()
      Combines a set of unis into a joined item.
      UniAny any()
      Creates a Uni forwarding the first event (item or failure).
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final UniCombine INSTANCE
    • Method Detail

      • any

        public UniAny any()
        Creates a Uni forwarding the first event (item or failure). It behaves like the fastest of these competing unis. If the passed iterable is empty, the resulting Uni gets a null item just after subscription.

        This method subscribes to the set of Uni. When one of the Uni fires an item or a failure a failure, the event is propagated downstream. Also the other subscriptions are cancelled.

        Note that the callback from the subscriber are called on the thread used to fire the event of the selected Uni. Use Uni.emitOn(Executor) to change that thread.

        If the subscription to the returned Uni is cancelled, the subscription to the unis contained in the iterable are also cancelled.

        Returns:
        the object to enlist the candidates
        See Also:
        Uni.or() for the equivalent operator on Uni instances