Package io.smallrye.mutiny.groups
Interface GeneratorEmitter<T>
-
- Type Parameters:
T
- the elements type
public interface GeneratorEmitter<T>
Interface forMulti
generators, where items are being generated on subscription requests.Each generation round shall call
emit(Object)
once, possibly followed by a terminal call tocomplete()
, or callfail(Throwable)
to terminate the stream with a failure.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete()
Complete the stream.void
emit(T item)
Emit an item.void
fail(java.lang.Throwable failure)
Emit a failure and terminate the stream.
-
-
-
Method Detail
-
emit
void emit(T item)
Emit an item.- Parameters:
item
- the item
-
fail
void fail(java.lang.Throwable failure)
Emit a failure and terminate the stream.- Parameters:
failure
- the failure
-
complete
void complete()
Complete the stream.
-
-