-
public interface DDCoreSubscription<T extends Object>A utility that holds listeners and notifies them. It satisfies the following requirements:
All methods can be called from any thread.
It is possible to call addListener and removeListener inside a listener callback.
Listeners are notified in the order addListener is called on them.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDDCoreSubscription.Companion
-
Method Summary
Modifier and Type Method Description abstract UnitaddListener(T listener)abstract UnitremoveListener(T listener)abstract UnitnotifyListeners(Function1<T, Unit> block)abstract IntegergetListenersCount()-
-
Method Detail
-
addListener
abstract Unit addListener(T listener)
-
removeListener
abstract Unit removeListener(T listener)
-
notifyListeners
abstract Unit notifyListeners(Function1<T, Unit> block)
-
getListenersCount
abstract Integer getListenersCount()
-
-
-
-