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 void
complete()
Sends the completion event to the channel indicating that no other events will be sent afterward.void
error(Exception e)
Sends a failure event to the channel.boolean
hasRequests()
boolean
isCancelled()
-
-
-
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:
true
if the emitter has been terminated or the subscription cancelled.
-
hasRequests
boolean hasRequests()
- Returns:
true
if one or more subscribers request messages from the corresponding channel where the emitter connects to, returnfalse
otherwise.
-
-