com.samskivert.util
Class ResultListenerList<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by com.samskivert.util.ObserverList<ResultListener<T>>
                  extended by com.samskivert.util.ResultListenerList<T>
All Implemented Interfaces:
ResultListener<T>, Serializable, Cloneable, Iterable<ResultListener<T>>, Collection<ResultListener<T>>, List<ResultListener<T>>, RandomAccess

public class ResultListenerList<T>
extends ObserverList<ResultListener<T>>
implements ResultListener<T>

Multiplexes ResultListener responses to multiple ResultListeners.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.samskivert.util.ObserverList
ObserverList.ObserverOp<T>
 
Nested classes/interfaces inherited from interface com.samskivert.util.ResultListener
ResultListener.NOOP<T>
 
Field Summary
 
Fields inherited from class com.samskivert.util.ObserverList
_allowDups, _policy, _snap, FAST_UNSAFE_NOTIFY, SAFE_IN_ORDER_NOTIFY, UNSUPPORTED_ADD_MESSAGE
 
Fields inherited from class java.util.AbstractList
modCount
 
Fields inherited from interface com.samskivert.util.ResultListener
NOOP
 
Constructor Summary
ResultListenerList()
          Create a ResultListenerList with the FAST_UNSAFE_NOTIFY policy.
ResultListenerList(int notifyPolicy)
          Create a ResultListenerList with your own notifyPolicy.
 
Method Summary
 void requestCompleted(T result)
          Multiplex a requestCompleted response to all the ResultListeners in this list.
 void requestFailed(Exception cause)
          Multiplex a requestFailed response to all the ResultListeners in this list.
 
Methods inherited from class com.samskivert.util.ObserverList
add, add, addAll, addAll, apply, checkedApply, indexOf, isDuplicate, lastIndexOf, newFastUnsafe, newList, newSafeInOrder, remove
 
Methods inherited from class java.util.ArrayList
clear, clone, contains, ensureCapacity, get, isEmpty, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

ResultListenerList

public ResultListenerList()
Create a ResultListenerList with the FAST_UNSAFE_NOTIFY policy.


ResultListenerList

public ResultListenerList(int notifyPolicy)
Create a ResultListenerList with your own notifyPolicy.

Method Detail

requestCompleted

public void requestCompleted(T result)
Multiplex a requestCompleted response to all the ResultListeners in this list.

Specified by:
requestCompleted in interface ResultListener<T>

requestFailed

public void requestFailed(Exception cause)
Multiplex a requestFailed response to all the ResultListeners in this list.

Specified by:
requestFailed in interface ResultListener<T>


Copyright © 2000-2008 Michael Bayne. All Rights Reserved.