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
Enclosing class:
PageEvent<T>

public static class PageEvent.ExtListenersHelper<ListenerType,​EventType>
extends xyz.cofe.ecolls.ListenersHelper<ListenerType,​EventType>
Помошник при работе с подписчиками
  • Field Summary

    Fields inherited from class xyz.cofe.ecolls.ListenersHelper

    callListener, eventBlockLevel, listeners, weakListeners
  • 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
    int getListenersCount()
    Возвращает кол-во подписчиков

    Methods inherited from class xyz.cofe.ecolls.ListenersHelper

    addEvent, addListener, addListener, fireEvent, get, getEventQueue, getListeners, getReadLock, getWriteLock, hasListener, removeAllListeners, removeListener, runEventQueue, withQueue, withQueue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface xyz.cofe.ecolls.ReadWriteLockProperty

    getReadWriteLock, setReadWriteLock

    Methods inherited from interface xyz.cofe.ecolls.ReadWriteLockSupport

    readLock, readLock, writeLock, writeLock
  • Constructor Details

    • ExtListenersHelper

      public ExtListenersHelper​(java.util.function.BiConsumer<ListenerType,​EventType> callListFunc)
      Конструктор. По умолчанию синхронизация включена, объект по которому происходит синх - 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:
      кол-во подписичиков