Modifier and Type | Method and 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.
|
org.reactivestreams.Publisher<Message<? extends T>> |
getPublisher() |
boolean |
isCancelled() |
boolean |
isRequested() |
<M extends Message<? extends T>> |
send(M msg)
Sends a payload to the channel.
|
CompletionStage<Void> |
send(T msg)
Sends a payload to the channel.
|
public CompletionStage<Void> send(T msg)
Emitter
public <M extends Message<? extends T>> void send(M msg)
Emitter
public void complete()
Emitter
public void error(Exception e)
Emitter
public boolean isCancelled()
isCancelled
in interface Emitter<T>
true
if the emitter has been terminated or the subscription cancelled.public boolean isRequested()
isRequested
in interface Emitter<T>
true
if the subscriber accepts messages, false
otherwise.
Using Emitter.send(Object)
on an emitter not expecting message would throw an IllegalStateException
.Copyright © 2018–2020 SmallRye. All rights reserved.