Annotation Interface 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
a Publisher
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 will receive the emitted values / signals:
@Inject @Channel("my-channel") Emitter<String> emitter;
// ...
emitter.send("a");
A subscriber for the above channel must be found when the application starts.
Otherwise, DeploymentException
must be thrown.-
Required Element Summary
-
Element Details
-
value
String valueThe 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.
-