Class EventFilterRegistry

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware

    public class EventFilterRegistry
    extends Object
    implements org.springframework.beans.factory.BeanFactoryAware
    Holds EventFilter implementations.
    Author:
    Jamal Kaabi-Mofrad
    • Constructor Detail

      • EventFilterRegistry

        public EventFilterRegistry()
    • Method Detail

      • setBeanFactory

        public void setBeanFactory​(@NonNull
                                   org.springframework.beans.factory.BeanFactory beanFactory)
                            throws org.springframework.beans.BeansException
        Specified by:
        setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
        Throws:
        org.springframework.beans.BeansException
      • getFilter

        public <F extends EventFilter<?>> F getFilter​(String beanName,
                                                      Class<F> filterClass)
        Return the filter bean instance that uniquely matches the given object type.
        Parameters:
        filterClass - the event filter type that the bean must match
        Returns:
        an instance of the filter bean matching the required type
        Throws:
        org.springframework.beans.factory.NoSuchBeanDefinitionException - - if no bean of the given type was found