Save This Page
Home » spring-framework-2.5.4 » org.springframework » context » event » [javadoc | source]
org.springframework.context.event
public class: SourceFilteringListener [javadoc | source]
java.lang.Object
   org.springframework.context.event.SourceFilteringListener

All Implemented Interfaces:
    ApplicationListener

org.springframework.context.ApplicationListener decorator that filters events from a specified event source, invoking its delegate listener for matching org.springframework.context.ApplicationEvent objects only.

Can also be used as base class, overriding the #onApplicationEventInternal method instead of specifying a delegate listener.

Constructor:
 protected SourceFilteringListener(Object source) 
    Create a SourceFilteringListener for the given event source, expecting subclasses to override the #onApplicationEventInternal method (instead of specifying a delegate listener).
    Parameters:
    source - the event source that this listener filters for, only processing events from this source
 public SourceFilteringListener(Object source,
    ApplicationListener delegate) 
    Create a SourceFilteringListener for the given event source.
    Parameters:
    source - the event source that this listener filters for, only processing events from this source
    delegate - the delegate listener to invoke with event from the specified source
Method from org.springframework.context.event.SourceFilteringListener Summary:
onApplicationEvent,   onApplicationEventInternal
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.context.event.SourceFilteringListener Detail:
 public  void onApplicationEvent(ApplicationEvent event) 
 protected  void onApplicationEventInternal(ApplicationEvent event) 
    Actually process the event, after having filtered according to the desired event source already.

    The default implementation invokes the specified delegate, if any.