Class EmitterImpl<T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.extension.EmitterImpl<T>
-
-
Constructor Summary
Constructors Constructor Description EmitterImpl(String name, String overFlowStrategy, long bufferSize, long defaultBufferSize)
-
Method Summary
All Methods Instance Methods Concrete 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.org.reactivestreams.Publisher<Message<? extends T>>getPublisher()booleanisCancelled()booleanisRequested()<M extends Message<? extends T>>
voidsend(M msg)Sends a payload to the channel.CompletionStage<Void>send(T msg)Sends a payload to the channel.
-
-
-
Method Detail
-
send
public CompletionStage<Void> send(T msg)
Description copied from interface:EmitterSends a payload to the channel.
-
send
public <M extends Message<? extends T>> void send(M msg)
Description copied from interface:EmitterSends a payload to the channel.
-
complete
public void complete()
Description copied from interface:EmitterSends the completion event to the channel indicating that no other events will be sent afterward.
-
error
public void error(Exception e)
Description copied from interface:EmitterSends a failure event to the channel. No more events will be sent afterward.
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelledin interfaceEmitter<T>- Returns:
trueif the emitter has been terminated or the subscription cancelled.
-
isRequested
public boolean isRequested()
- Specified by:
isRequestedin interfaceEmitter<T>- Returns:
trueif the subscriber accepts messages,falseotherwise. UsingEmitter.send(Object)on an emitter not expecting message would throw anIllegalStateException.
-
-