Class RangePublisher

java.lang.Object
org.reactivestreams.example.unicast.RangePublisher
All Implemented Interfaces:
Publisher<Integer>

public final class RangePublisher extends Object implements Publisher<Integer>
A synchronous implementation of the Publisher that can be subscribed to multiple times and each individual subscription will receive range of monotonically increasing integer values on demand.
  • Constructor Details

    • RangePublisher

      public RangePublisher(int start, int count)
      Constructs a RangePublisher instance with the given start and count values that yields a sequence of [start, start + count).
      Parameters:
      start - the starting value of the range
      count - the number of items to emit
  • Method Details