...
Similarly, the @Default
qualifier can be used to observe Camel events for the default Camel context if multiples contexts exist, e.g.:
Code Block | ||
---|---|---|
| ||
void onExchangeCompleted(@Observes @Default ExchangeCompletedEvent event) { // Called after the exchange 'event.getExchange()' processing has completed } |
In that example, if no qualifier is specified, the @Any
qualifier is implicitly assumed, so that corresponding events for all the Camel contexts get received.
...
While the CDI programmatic model favors a typesafe type-safe resolutionmechanism mechanism that occurs at application initialization time, it is possible to perform dynamic / lazy injection later during the application execution using the programmatic lookup mechanism.
...