org.springframework.context.event
Class EventPublicationInterceptor

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.context.event.EventPublicationInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, ApplicationContextAware, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class EventPublicationInterceptor
extends ApplicationObjectSupport
implements org.aopalliance.intercept.MethodInterceptor

Interceptor that knows how to publish ApplicationEvents to all ApplicationListeners registered with ApplicationContext

Version:
$Id: EventPublicationInterceptor.java,v 1.3 2004/03/18 02:46:10 trisberg Exp $
Author:
Dmitriy Kopylenko

Field Summary
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
EventPublicationInterceptor()
           
 
Method Summary
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
           
 void setApplicationEventClass(java.lang.Class applicationEventClass)
          Set the application event class to publish.
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventPublicationInterceptor

public EventPublicationInterceptor()
Method Detail

setApplicationEventClass

public void setApplicationEventClass(java.lang.Class applicationEventClass)
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.


invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable


Copyright (C) 2003-2004 The Spring Framework Project.