Annotation Type Channel
-
@Qualifier @Retention(RUNTIME) @Target({METHOD,CONSTRUCTOR,FIELD,PARAMETER}) public @interface Channel
This qualifier indicates which channel should be injected / populated.This qualifier can be used to inject a Channel containing the items and signals propagated by the specified channel. For example, it can be used to
@Inject
aPublisher
representing a channel managed by the Reactive Messaging implementation.Can be injected:
- Publisher<X> with X the payload type
- Publisher<Message<X>> with X the payload type
- PublisherBuilder<Message<X>> with X the payload type
- PublisherBuilder<X> with X the payload type
When this qualifier is used on an
Emitter
, it indicates which channel received the emitted values / signals:@Inject @Channel("my-channel") Emitter<String> emitter; // ... emitter.send("a");
IllegalStateException
must be thrown.
-
-
Element Detail
-
value
String value
The name of the channel (indicated in the@Outgoing
annotation.- Returns:
- the channel name, mandatory, non-
null
and non-blank. It must matches one of the available channels.
-
-