All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.cdi.event.AbstractEventBridge Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.cdi.event;

import javax.enterprise.event.Event;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import java.lang.annotation.Annotation;

/**
 * @author Pete Muir
 */
public abstract class AbstractEventBridge {

   @Inject
   private Event baseEvent;

   @Inject
   private BeanManager beanManager;

   protected Event getBaseEvent() {
      return baseEvent;
   }

   protected boolean hasObservers(T event, Annotation[] qualifiers) {
      return !beanManager.resolveObserverMethods(event, qualifiers).isEmpty();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy