java.lang.Object | |
↳ | org.springframework.context.event.SourceFilteringListener |
ApplicationListener
decorator that filters
events from a specified event source, invoking its delegate listener for
matching ApplicationEvent
objects only.
Can also be used as base class, overriding the onApplicationEventInternal(ApplicationEvent)
method instead of specifying a delegate listener.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.springframework.core.Ordered
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a SourceFilteringListener for the given event source.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a SourceFilteringListener for the given event source,
expecting subclasses to override the
onApplicationEventInternal(ApplicationEvent)
method (instead of specifying a delegate listener). |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
| |||||||||||
Determine whether this listener actually supports the given event type.
| |||||||||||
Determine whether this listener actually supports the given source type.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Actually process the event, after having filtered according to the
desired event source already.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationListener
| |||||||||||
From interface
org.springframework.context.event.SmartApplicationListener
| |||||||||||
From interface
org.springframework.core.Ordered
|
Create a SourceFilteringListener for the given event source.
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 |
Create a SourceFilteringListener for the given event source,
expecting subclasses to override the onApplicationEventInternal(ApplicationEvent)
method (instead of specifying a delegate listener).
source | the event source that this listener filters for, only processing events from this source |
---|
Return the order value of this object, with a higher value meaning greater in terms of sorting.
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
Determine whether this listener actually supports the given event type.
Determine whether this listener actually supports the given source type.
Actually process the event, after having filtered according to the desired event source already.
The default implementation invokes the specified delegate, if any.
event | the event to process (matching the specified source) |
---|