com.threerings.presents.util
Class ResultListenerList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<InvocationService.ResultListener>
              extended by com.threerings.presents.util.ResultListenerList
All Implemented Interfaces:
InvocationService.InvocationListener, InvocationService.ResultListener, Serializable, Cloneable, Iterable<InvocationService.ResultListener>, Collection<InvocationService.ResultListener>, List<InvocationService.ResultListener>, RandomAccess

public class ResultListenerList
extends ArrayList<InvocationService.ResultListener>
implements InvocationService.ResultListener

Maintains a list of result listeners, dispatching the eventual actual result or failure to them all as if they were a single listener.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ResultListenerList()
           
 
Method Summary
 void requestFailed(String cause)
          Called to report request failure.
 void requestProcessed(Object result)
          Indicates that the request was successfully processed.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, 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()
Method Detail

requestProcessed

public void requestProcessed(Object result)
Description copied from interface: InvocationService.ResultListener
Indicates that the request was successfully processed.

Specified by:
requestProcessed in interface InvocationService.ResultListener

requestFailed

public void requestFailed(String cause)
Description copied from interface: InvocationService.InvocationListener
Called to report request failure. If the invocation services system detects failure of any kind, it will report it via this callback. Particular services may also make use of this callback to report failures of their own, or they may opt to define more specific failure callbacks.

Specified by:
requestFailed in interface InvocationService.InvocationListener