java.lang.Object | |
↳ | org.springframework.context.event.EventPublicationInterceptor |
MethodInterceptor Interceptor that publishes an
ApplicationEvent
to all ApplicationListeners
registered with an ApplicationEventPublisher
after each
successful method invocation.
Note that this interceptor is only capable of publishing stateless
events configured via the
"applicationEventClass"
property.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
| |||||||||||
Set the application event class to publish.
| |||||||||||
Set the ApplicationEventPublisher that this object runs in.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
| |||||||||||
From interface
org.springframework.context.ApplicationEventPublisherAware
|
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
Exception |
---|
Set the application event class to publish.
The event class must have a constructor with a single
Object
argument for the event source. The interceptor
will pass in the invoked object.
IllegalArgumentException | if the supplied Class is
null or if it is not an ApplicationEvent subclass or
if it does not expose a constructor that takes a single Object argument
|
---|
Set the ApplicationEventPublisher that this object runs in.
Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.
applicationEventPublisher | event publisher to be used by this object |
---|