pivot.util.concurrent
Class SynchronizedListenerList<T>

java.lang.Object
  extended by pivot.util.ListenerList<T>
      extended by pivot.util.concurrent.SynchronizedListenerList<T>
All Implemented Interfaces:
java.lang.Iterable<T>

public abstract class SynchronizedListenerList<T>
extends ListenerList<T>

Abstract base class for synchronized listener lists.

Author:
gbrown
See Also:
ListenerList

Constructor Summary
SynchronizedListenerList()
           
 
Method Summary
 void add(T listener)
          Adds a listener to the list, if it has not previously been added.
 java.util.Iterator<T> iterator()
          NOTE Callers must manually synchronize on the SynchronizedListenerList instance to ensure thread safety during iteration.
 void remove(T listener)
          Removes a listener from the list, if it has previously been added.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedListenerList

public SynchronizedListenerList()
Method Detail

add

public void add(T listener)
Description copied from class: ListenerList
Adds a listener to the list, if it has not previously been added.

Overrides:
add in class ListenerList<T>

remove

public void remove(T listener)
Description copied from class: ListenerList
Removes a listener from the list, if it has previously been added.

Overrides:
remove in class ListenerList<T>

iterator

public java.util.Iterator<T> iterator()
NOTE Callers must manually synchronize on the SynchronizedListenerList instance to ensure thread safety during iteration.

Specified by:
iterator in interface java.lang.Iterable<T>
Overrides:
iterator in class ListenerList<T>