void observesFooPOM(@Observes ProcessObserverMethod<Bar, Foo> event){ ObserverMethodConfigurator<Bar> observerMethodConfigurator = event.configureObserverMethod(); observerMethodConfigurator.priority(1000); sameOMConfiguratorReturned.set(observerMethodConfigurator.equals(event.configureObserverMethod())); }
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); }
public void afterBeanDiscovery(@Observes AfterBeanDiscovery event) { // not overriding notify method -> definition error event.<Foo>addObserverMethod().read(fooObserverMethod).async(true).priority(ObserverMethod.DEFAULT_PRIORITY); }