Package org.apache.shiro.spring
Class ShiroEventBusBeanPostProcessor
- java.lang.Object
-
- org.apache.shiro.spring.ShiroEventBusBeanPostProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor
public class ShiroEventBusBeanPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
SpringBeanPostProcessor
that detects,EventBusAware
and classes containing@Subscribe
methods. Any classes implementing EventBusAware will have the setEventBus() method called with theeventBus
. Any classes discovered with methods that are annotated with @Subscribe will be automaticly registered with the EventBus.NOTE: in a Spring environment implementing EventBusAware is not necessary, as you can just inject the EventBus with
@Autowire
.- Since:
- 1.4
- See Also:
EventBusAware
,Subscribe
-
-
Constructor Summary
Constructors Constructor Description ShiroEventBusBeanPostProcessor(org.apache.shiro.event.EventBus eventBus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
postProcessAfterInitialization(Object bean, String beanName)
Object
postProcessBeforeInitialization(Object bean, String beanName)
-
-
-
Method Detail
-
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessBeforeInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
- Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
-