Package io.ably.lib.util

Class Multicaster<T>

java.lang.Object
io.ably.lib.util.Multicaster<T>
Type Parameters:
T - The type of elements being added to this multicaster - the listeners.
Direct Known Subclasses:
ChannelStateListener.Multicaster, CompletionListener.Multicaster, ConnectionStateListener.Multicaster

public abstract class Multicaster<T> extends Object
Collection of members who are listeners, with methods that are safe to be called from any thread.
  • Constructor Details

    • Multicaster

      public Multicaster(T... members)
  • Method Details

    • add

      public void add(T member)
    • remove

      public void remove(T member)
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • getMembers

      protected List<T> getMembers()
      Returns a snapshot of the members of this multicaster instance.