Interface Listenable<T>
- All Known Subinterfaces:
ListenerManager<K,
,V> ServiceCache<T>
,SharedCountReader
,UnaryListenerManager<T>
- All Known Implementing Classes:
MappingListenerManager
,ServiceCacheImpl
,SharedCount
,StandardListenerManager
public interface Listenable<T>
Abstracts a listenable object
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(T listener) Add the given listener.void
addListener
(T listener, Executor executor) Add the given listener.void
removeListener
(T listener) Remove the given listener
-
Method Details
-
addListener
Add the given listener. The listener will be executed in the containing instance's thread.- Parameters:
listener
- listener to add
-
addListener
Add the given listener. The listener will be executed using the given executor- Parameters:
listener
- listener to addexecutor
- executor to run listener in
-
removeListener
Remove the given listener- Parameters:
listener
- listener to remove
-