Package io.smallrye.mutiny.groups
Interface GeneratorEmitter<T>
-
- Type Parameters:
T- the elements type
public interface GeneratorEmitter<T>Interface forMultigenerators, 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 voidcomplete()Complete the stream.voidemit(T item)Emit an item.voidfail(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.
-
-