com.samskivert.util
Class ResultListenerList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
com.samskivert.util.ObserverList<ResultListener<T>>
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
|
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 |
ResultListenerList
public ResultListenerList()
- Create a ResultListenerList with the FAST_UNSAFE_NOTIFY policy.
ResultListenerList
public ResultListenerList(int notifyPolicy)
- Create a ResultListenerList with your own notifyPolicy.
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.