Class ListenerManager<T>

java.lang.Object
com.biglybt.core.util.ListenerManager<T>

public class ListenerManager<T> extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • createManager

      public static <T> ListenerManager<T> createManager(String name, ListenerManagerDispatcher<T> target)
    • createAsyncManager

      public static <T> ListenerManager<T> createAsyncManager(String name, ListenerManagerDispatcher<T> target)
    • addListener

      public void addListener(T listener)
    • removeListener

      public void removeListener(T listener)
    • hasListener

      public boolean hasListener(T listener)
    • clear

      public void clear()
    • getListenersCopy

      public List<T> getListenersCopy()
    • dispatch

      public void dispatch(int type, Object value)
    • dispatch

      public void dispatch(int type, Object value, boolean blocking)
    • dispatchWithException

      public void dispatchWithException(int type, Object value) throws Throwable
      Throws:
      Throwable
    • dispatch

      public void dispatch(T listener, int type, Object value)
    • dispatch

      public void dispatch(T listener, int type, Object value, boolean blocking)
    • getListenerName

      protected String getListenerName(T listener)
    • doDispatch

      protected void doDispatch(T listener, int type, Object value)
    • doDispatchWithException

      protected void doDispatchWithException(T listener, int type, Object value) throws Throwable
      Throws:
      Throwable
    • dispatchInternal

      protected void dispatchInternal(List<T> listeners_ref, int type, Object value) throws Throwable
      Throws:
      Throwable
    • dispatchInternal

      protected void dispatchInternal(T listener, int type, Object value) throws Throwable
      Throws:
      Throwable
    • dispatchLoop

      public void dispatchLoop()
    • dispatchWithTimeout

      public static <T> void dispatchWithTimeout(List<T> _listeners, ListenerManagerDispatcher<T> _dispatcher, long _timeout)
    • size

      public long size()