com.twitter.common.thrift.callers
Class Caller.WrappedMethodCallback

java.lang.Object
  extended by com.twitter.common.thrift.callers.Caller.WrappedMethodCallback
All Implemented Interfaces:
org.apache.thrift.async.AsyncMethodCallback
Enclosing interface:
Caller

public static class Caller.WrappedMethodCallback
extends Object
implements org.apache.thrift.async.AsyncMethodCallback

A callback that adapts a Caller.ResultCapture with an AsyncMethodCallback while maintaining the AsyncMethodCallback interface. The wrapped callback will handle invocation of the underlying callback based on the return values from the ResultCapture.


Constructor Summary
Caller.WrappedMethodCallback(org.apache.thrift.async.AsyncMethodCallback wrapped, Caller.ResultCapture capture)
           
 
Method Summary
 void onComplete(Object o)
           
 void onError(Throwable t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Caller.WrappedMethodCallback

public Caller.WrappedMethodCallback(org.apache.thrift.async.AsyncMethodCallback wrapped,
                                    Caller.ResultCapture capture)
Method Detail

onComplete

public void onComplete(Object o)
Specified by:
onComplete in interface org.apache.thrift.async.AsyncMethodCallback

onError

public void onError(Throwable t)
Specified by:
onError in interface org.apache.thrift.async.AsyncMethodCallback