Interface GeneratorEmitter<T>

Type Parameters:
T - the elements type

public interface GeneratorEmitter<T>
Interface for Multi generators, where items are being generated on subscription requests.

Each generation round shall call emit(Object) once, possibly followed by a terminal call to complete(), or call fail(Throwable) to terminate the stream with a failure.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Complete the stream.
    void
    emit(T item)
    Emit an item.
    void
    fail(Throwable failure)
    Emit a failure and terminate the stream.
  • Method Details

    • emit

      void emit(T item)
      Emit an item.
      Parameters:
      item - the item
    • fail

      void fail(Throwable failure)
      Emit a failure and terminate the stream.
      Parameters:
      failure - the failure
    • complete

      void complete()
      Complete the stream.