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.
setApplicationEventClass, org.springframework.context.ApplicationEvent , org.springframework.context.ApplicationListener , org.springframework.context.ApplicationEventPublisher , org.springframework.context.ApplicationContext
| Modifier and Type | Field and Description |
|---|---|
| private Constructor | |
| private ApplicationEventPublisher |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public Object | invoke(MethodInvocation
the method invocation joinpoint invocation)Implements org. |
| public void | |
| public void | setApplicationEventPublisher(ApplicationEventPublisher
event publisher to be used by this object applicationEventPublisher)Implements org. Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. |
| applicationEventClassConstructor | back to summary |
|---|---|
| private Constructor<?> applicationEventClassConstructor
| |
| applicationEventPublisher | back to summary |
|---|---|
| private ApplicationEventPublisher applicationEventPublisher
| |
| EventPublicationInterceptor | back to summary |
|---|---|
| public EventPublicationInterceptor() | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws Exception Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. | |
| invoke | back to summary |
|---|---|
| public Object invoke(MethodInvocation invocation) throws Throwable Implements org. Doc from org. Implement this method to perform extra treatments before and
after the invocation. Polite implementations would certainly
like to invoke
| |
| setApplicationEventClass | back to summary |
|---|---|
| public void setApplicationEventClass(Class<?> applicationEventClass) Set the application event class to publish. The event class must have a constructor with a single
| |
| setApplicationEventPublisher | back to summary |
|---|---|
| public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) Implements org. Doc from org. 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.
| |