Package io.smallrye.reactive.messaging
Interface EmitterBehavior
-
- All Known Subinterfaces:
Emitter<T>,MutinyEmitter<T>
- All Known Implementing Classes:
AbstractEmitter,EmitterImpl,MutinyEmitterImpl
public interface EmitterBehavior
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcomplete()Sends the completion event to the channel indicating that no other events will be sent afterward.voiderror(Exception e)Sends a failure event to the channel.booleanhasRequests()booleanisCancelled()
-
-
-
Method Detail
-
complete
void complete()
Sends the completion event to the channel indicating that no other events will be sent afterward.
-
error
void error(Exception e)
Sends a failure event to the channel. No more events will be sent afterward.- Parameters:
e- the exception, must not benull
-
isCancelled
boolean isCancelled()
- Returns:
trueif the emitter has been terminated or the subscription cancelled.
-
hasRequests
boolean hasRequests()
- Returns:
trueif one or more subscribers request messages from the corresponding channel where the emitter connects to, returnfalseotherwise.
-
-