com.threerings.presents.util
Class ResultAdapter<T>
java.lang.Object
com.threerings.presents.util.ResultAdapter<T>
- Type Parameters:
T - the type of result expected by the listener.
- All Implemented Interfaces:
- ResultListener<T>
public class ResultAdapter<T>
- extends Object
- implements ResultListener<T>
Adapts the response from a ResultListener to an InvocationService.ResultListener if the
failure is an instance of InvocationException the message will be passed on to the
result listener, otherwise they will be provided with InvocationCodes.INTERNAL_ERROR.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_listener
protected InvocationService.ResultListener _listener
ResultAdapter
public ResultAdapter(InvocationService.ResultListener listener)
- Creates an adapter with the supplied listener.
requestCompleted
public void requestCompleted(T result)
- Specified by:
requestCompleted in interface ResultListener<T>
requestFailed
public void requestFailed(Exception cause)
- Specified by:
requestFailed in interface ResultListener<T>