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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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 Detail
-
addListener
void addListener(T listener)
Add the given listener. The listener will be executed in the containing instance's thread.- Parameters:
listener
- listener to add
-
addListener
void addListener(T listener, Executor executor)
Add the given listener. The listener will be executed using the given executor- Parameters:
listener
- listener to addexecutor
- executor to run listener in
-
removeListener
void removeListener(T listener)
Remove the given listener- Parameters:
listener
- listener to remove
-
-