Package xyz.cofe.cbuffer.page
Class PageEvent.ExtListenersHelper<ListenerType,EventType>
java.lang.Object
xyz.cofe.ecolls.ListenersHelper<ListenerType,EventType>
xyz.cofe.cbuffer.page.PageEvent.ExtListenersHelper<ListenerType,EventType>
- Type Parameters:
ListenerType- ПодписчикEventType- Событие
- All Implemented Interfaces:
xyz.cofe.ecolls.GetReadLock,xyz.cofe.ecolls.GetWriteLock,xyz.cofe.ecolls.ReadWriteLockProperty,xyz.cofe.ecolls.ReadWriteLockSupport
public static class PageEvent.ExtListenersHelper<ListenerType,EventType>
extends xyz.cofe.ecolls.ListenersHelper<ListenerType,EventType>
Помошник при работе с подписчиками
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ExtListenersHelper(java.util.function.BiConsumer<ListenerType,EventType> callListFunc)Конструктор.ExtListenersHelper(java.util.function.BiConsumer<ListenerType,EventType> callListFunc, java.util.concurrent.locks.ReadWriteLock rwLocks)Конструктор. -
Method Summary
Modifier and Type Method Description intgetListenersCount()Возвращает кол-во подписчиковMethods inherited from class xyz.cofe.ecolls.ListenersHelper
addEvent, addListener, addListener, fireEvent, get, getEventQueue, getListeners, getReadLock, getWriteLock, hasListener, removeAllListeners, removeListener, runEventQueue, withQueue, withQueueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ExtListenersHelper
Конструктор. По умолчанию синхронизация включена, объект по которому происходит синх - this.- Parameters:
callListFunc- Функция вызывающая listener.method( collectionEvent );
-
ExtListenersHelper
public ExtListenersHelper(java.util.function.BiConsumer<ListenerType,EventType> callListFunc, java.util.concurrent.locks.ReadWriteLock rwLocks)Конструктор.- Parameters:
callListFunc- Функция вызывающая listener.method( collectionEvent );rwLocks- Блокировки чтения/записи
-
-
Method Details
-
getListenersCount
public int getListenersCount()Возвращает кол-во подписчиков- Returns:
- кол-во подписичиков
-