Interface Caller

All Known Implementing Classes:
DeadlineCaller, DebugCaller, RetryingCaller, StatTrackingCaller, ThriftCaller

public interface Caller

A caller that invokes a method on an object.

Nested Class Summary
static interface Caller.ResultCapture
          Captures the result of a request, whether synchronous or asynchronous.
static class Caller.WrappedMethodCallback
          A callback that adapts a Caller.ResultCapture with an AsyncMethodCallback while maintaining the AsyncMethodCallback interface.
Method Summary
 Object call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
          Invokes a method on an object, using the given arguments.

Method Detail


Object call(Method method,
            Object[] args,
            org.apache.thrift.async.AsyncMethodCallback callback,
            Amount<Long,Time> connectTimeoutOverride)
            throws Throwable
Invokes a method on an object, using the given arguments. The method call may be asynchronous, in which case callback will be non-null.

method - The method being invoked.
args - The arguments to call method with.
callback - The callback to use if the method is asynchronous.
connectTimeoutOverride - Optional override for the default connection timeout.
The return value from invoking the method.
Throwable - Exception, as prescribed by the method's contract.