public interface FilteringListenable<K,V> extends Listenable
Modifier and Type | Method and Description |
---|---|
<C> void |
addListener(Object listener,
CacheEventFilter<? super K,? super V> filter,
CacheEventConverter<? super K,? super V,C> converter)
Registers a listener that will be notified on events that pass the filter condition.
|
void |
addListener(Object listener,
KeyFilter<? super K> filter)
Adds a listener to the component.
|
addListener, getListeners, removeListener
void addListener(Object listener, KeyFilter<? super K> filter)
Listener
and
further to that, contain methods annotated appropriately, otherwise the listener will not be registered.
See the Listener
annotation for more information.
listener
- must not be null.<C> void addListener(Object listener, CacheEventFilter<? super K,? super V> filter, CacheEventConverter<? super K,? super V,C> converter)
Some implementations may provide optimizations when a
CacheEventFilterConverter
is provided as both arguments
to the filter and converter arguments. Note the provided object must have reference equality ie. (==)
to be recognized. This allows for the filter and conversion step to take place in the same method call reducing
possible overhead.
C
- The type of the resultant value after being convertedlistener
- The listener to callback upon event notifications. Must not be null.filter
- The filter to see if the notification should be sent to the listener. Can be null.converter
- The converter to apply to the entry before being sent to the listener. Can be null.NullPointerException
- if the specified listener is nullCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.