com.twitter.common.thrift.callers
Interface Caller.ResultCapture

Enclosing interface:
Caller

public static interface Caller.ResultCapture

Captures the result of a request, whether synchronous or asynchronous. It should be expected that for every request made, exactly one of these methods will be called.


Method Summary
 boolean fail(Throwable t)
          Called when the request failed.
 void success()
          Called when the request completed successfully.
 

Method Detail

success

void success()
Called when the request completed successfully.


fail

boolean fail(Throwable t)
Called when the request failed.

Parameters:
t - Throwable that was caught. Must never be null.
Returns:
true if a wrapped callback should be notified of the failure, false otherwise.