com.threerings.presents.util
Class InvocationAdapter

java.lang.Object
  extended by com.threerings.presents.util.InvocationAdapter
All Implemented Interfaces:
InvocationService.InvocationListener, InvocationService.ResultListener

public class InvocationAdapter
extends Object
implements InvocationService.ResultListener

Adapts the response from a InvocationService.ResultListener to a ResultListener. In the event of failure, the failure string is wrapped in an InvocationException.


Field Summary
protected  com.samskivert.util.ResultListener<Object> _target
           
 
Constructor Summary
InvocationAdapter(com.samskivert.util.ResultListener<Object> target)
           
 
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.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_target

protected com.samskivert.util.ResultListener<Object> _target
Constructor Detail

InvocationAdapter

public InvocationAdapter(com.samskivert.util.ResultListener<Object> target)
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