Class TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT> (2.48.1)

public class TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT> extends UnaryCallable<OuterRequestT,OuterResponseT>

A UnaryCallable that translates request types and response types using the given transformers.

Inheritance

java.lang.Object > UnaryCallable > TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT>

Type Parameters

Name Description
InnerRequestT
InnerResponseT
OuterRequestT
OuterResponseT

Static Methods

<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT>create(UnaryCallable<InnerRequestT,InnerResponseT> innerUnaryCallable, ApiFunction<OuterRequestT,InnerRequestT> requestTransformer, ApiFunction<InnerResponseT,OuterResponseT> responseTransformer)

public static TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT> <InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT>create(UnaryCallable<InnerRequestT,InnerResponseT> innerUnaryCallable, ApiFunction<OuterRequestT,InnerRequestT> requestTransformer, ApiFunction<InnerResponseT,OuterResponseT> responseTransformer)
Parameters
Name Description
innerUnaryCallable UnaryCallable<InnerRequestT,InnerResponseT>
requestTransformer ApiFunction<OuterRequestT,InnerRequestT>
responseTransformer ApiFunction<InnerResponseT,OuterResponseT>
Returns
Type Description
TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT>

Methods

futureCall(OuterRequestT request, ApiCallContext context)

public ApiFuture<OuterResponseT> futureCall(OuterRequestT request, ApiCallContext context)

Perform a call asynchronously.

Parameters
Name Description
request OuterRequestT
context ApiCallContext
Returns
Type Description
ApiFuture<OuterResponseT>
Overrides