public class Calls extends Object
| Constructor and Description |
|---|
Calls() |
| Modifier and Type | Method and Description |
|---|---|
static <ReqT,RespT> |
asyncClientStreamingCall(Call<ReqT,RespT> call,
StreamObserver<RespT> responseObserver)
Executes a client-streaming call returning a
StreamObserver for the request messages. |
static <ReqT,RespT> |
asyncServerStreamingCall(Call<ReqT,RespT> call,
ReqT param,
StreamObserver<RespT> responseObserver)
Executes a server-streaming call with a response
StreamObserver. |
static <ReqT,RespT> |
asyncUnaryCall(Call<ReqT,RespT> call,
ReqT param,
StreamObserver<RespT> observer)
Executes a unary call with a response
StreamObserver. |
static <ReqT,RespT> |
blockingClientStreamingCall(Call<ReqT,RespT> call,
Iterator<ReqT> clientStream)
Executes a client-streaming call with a blocking
Iterator of request messages. |
static <ReqT,RespT> |
blockingServerStreamingCall(Call<ReqT,RespT> call,
ReqT param)
Executes a server-streaming call returning a blocking
Iterator over the
response stream. |
static <ReqT,RespT> |
blockingUnaryCall(Call<ReqT,RespT> call,
ReqT param)
Executes a unary call and blocks on the response.
|
static <RequestT,ResponseT> |
createMethodDescriptor(String fullServiceName,
Method<RequestT,ResponseT> method)
Creates a
MethodDescriptor for a given method. |
static <ReqT,RespT> |
duplexStreamingCall(Call<ReqT,RespT> call,
StreamObserver<RespT> responseObserver)
Executes a duplex-streaming call.
|
static <ReqT,RespT> |
unaryFutureCall(Call<ReqT,RespT> call,
ReqT param)
Executes a unary call and returns a
ListenableFuture to the response. |
public static <RequestT,ResponseT> MethodDescriptor<RequestT,ResponseT> createMethodDescriptor(String fullServiceName, Method<RequestT,ResponseT> method)
MethodDescriptor for a given method.fullServiceName - fully qualified service namemethod - carries all invariants of the methodpublic static <ReqT,RespT> ListenableFuture<RespT> unaryFutureCall(Call<ReqT,RespT> call, ReqT param)
ListenableFuture to the response.public static <ReqT,RespT> RespT blockingUnaryCall(Call<ReqT,RespT> call, ReqT param)
public static <ReqT,RespT> void asyncUnaryCall(Call<ReqT,RespT> call, ReqT param, StreamObserver<RespT> observer)
StreamObserver.public static <ReqT,RespT> Iterator<RespT> blockingServerStreamingCall(Call<ReqT,RespT> call, ReqT param)
Iterator over the
response stream.public static <ReqT,RespT> void asyncServerStreamingCall(Call<ReqT,RespT> call, ReqT param, StreamObserver<RespT> responseObserver)
StreamObserver.public static <ReqT,RespT> RespT blockingClientStreamingCall(Call<ReqT,RespT> call, Iterator<ReqT> clientStream)
Iterator of request messages.public static <ReqT,RespT> StreamObserver<ReqT> asyncClientStreamingCall(Call<ReqT,RespT> call, StreamObserver<RespT> responseObserver)
StreamObserver for the request messages.public static <ReqT,RespT> StreamObserver<ReqT> duplexStreamingCall(Call<ReqT,RespT> call, StreamObserver<RespT> responseObserver)