void observesPearPOM(@Observes ProcessObserverMethod<Pear, FruitObserver> event) { // add @Ripe and @Delicious to the observed type // make observer asynchronous // set priority event.configureObserverMethod() .addQualifiers(Ripe.RipeLiteral.INSTANCE, Delicious.DeliciousLiteral.INSTANCE) .async(true) .priority(ObserverMethod.DEFAULT_PRIORITY + 100); }
.addQualifiers(Ripe.RipeLiteral.INSTANCE, Any.Literal.INSTANCE) .notifyWith((b) -> { newBananaObserverNotified.set(true);