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

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

NameDescription
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
NameDescription
innerUnaryCallableUnaryCallable<InnerRequestT,InnerResponseT>
requestTransformerApiFunction<OuterRequestT,InnerRequestT>
responseTransformerApiFunction<InnerResponseT,OuterResponseT>
Returns
TypeDescription
TranslatingUnaryCallable<InnerRequestT,InnerResponseT,OuterRequestT,OuterResponseT>

Methods

futureCall(OuterRequestT request, ApiCallContext context)

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

Perform a call asynchronously.

Parameters
NameDescription
requestOuterRequestT
contextApiCallContext
Returns
TypeDescription
ApiFuture<OuterResponseT>
Overrides