Class LegacyEmitterImpl<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.providers.extension.LegacyEmitterImpl<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
Completes the stream.void
error(Exception e)
Propagates an error in the stream.boolean
isCancelled()
boolean
isRequested()
Emitter<T>
send(T msg)
Sends a payload or a message to the stream.
-
-
-
Method Detail
-
complete
public void complete()
Description copied from interface:Emitter
Completes the stream. This method sends the completion signal, no messages can be sent once this method is called.
-
error
public void error(Exception e)
Description copied from interface:Emitter
Propagates an error in the stream. This methods sends an error signal, no messages can be sent once this method is called.
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceEmitter<T>
- Returns:
true
if the emitter has been terminated or the subscription cancelled.
-
isRequested
public boolean isRequested()
- Specified by:
isRequested
in interfaceEmitter<T>
- Returns:
true
if the subscriber accepts messages,false
otherwise. UsingEmitter.send(Object)
on an emitter not expecting message would throw anIllegalStateException
.
-
-