org.infinispan.notifications
Interface Listenable

All Known Subinterfaces:
AdvancedCache<K,V>, Cache<K,V>, CacheManager, CacheManagerNotifier, CacheNotifier, EmbeddedCacheManager
All Known Implementing Classes:
AbstractDelegatingAdvancedCache, AbstractDelegatingCache, AbstractDelegatingEmbeddedCacheManager, CacheImpl, CacheManagerNotifierImpl, CacheNotifierImpl, ClassLoaderSpecfiedCache, DecoratedCache, DefaultCacheManager

public interface Listenable

Interface that denotes that the implementation can have listeners attached to it.

Since:
4.0
Author:
Manik Surtani

Method Summary
 void addListener(Object listener)
          Adds a listener to the component.
 Set<Object> getListeners()
           
 void removeListener(Object listener)
          Removes a listener from the component.
 

Method Detail

addListener

void addListener(Object listener)
Adds a listener to the component. Typically, listeners would need to be annotated with Listener and further to that, contain methods annotated appropriately, otherwise the listener will not be registered.

See the Listener annotation for more information.

Parameters:
listener - must not be null.

removeListener

void removeListener(Object listener)
Removes a listener from the component.

Parameters:
listener - listener to remove. Must not be null.

getListeners

Set<Object> getListeners()
Returns:
a set of all listeners registered on this component.

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.