public final class ClientCalls extends Object
Modifier and Type | Method and Description |
---|---|
static <ReqT,RespT> |
asyncBidiStreamingCall(ClientCall<ReqT,RespT> call,
StreamObserver<RespT> responseObserver)
Executes a bidirectional-streaming call.
|
static <ReqT,RespT> |
asyncClientStreamingCall(ClientCall<ReqT,RespT> call,
StreamObserver<RespT> responseObserver)
Executes a client-streaming call returning a
StreamObserver for the request messages. |
static <ReqT,RespT> |
asyncServerStreamingCall(ClientCall<ReqT,RespT> call,
ReqT req,
StreamObserver<RespT> responseObserver)
Executes a server-streaming call with a response
StreamObserver . |
static <ReqT,RespT> |
asyncUnaryCall(ClientCall<ReqT,RespT> call,
ReqT req,
StreamObserver<RespT> responseObserver)
Executes a unary call with a response
StreamObserver . |
static <ReqT,RespT> |
blockingServerStreamingCall(Channel channel,
MethodDescriptor<ReqT,RespT> method,
CallOptions callOptions,
ReqT req)
Executes a server-streaming call returning a blocking
Iterator over the
response stream. |
static <ReqT,RespT> |
blockingServerStreamingCall(ClientCall<ReqT,RespT> call,
ReqT req)
Executes a server-streaming call returning a blocking
Iterator over the
response stream. |
static <ReqT,RespT> |
blockingUnaryCall(Channel channel,
MethodDescriptor<ReqT,RespT> method,
CallOptions callOptions,
ReqT req)
Executes a unary call and blocks on the response.
|
static <ReqT,RespT> |
blockingUnaryCall(ClientCall<ReqT,RespT> call,
ReqT req)
Executes a unary call and blocks on the response.
|
static <ReqT,RespT> |
futureUnaryCall(ClientCall<ReqT,RespT> call,
ReqT req)
Executes a unary call and returns a
ListenableFuture to the response. |
public static <ReqT,RespT> void asyncUnaryCall(ClientCall<ReqT,RespT> call, ReqT req, StreamObserver<RespT> responseObserver)
StreamObserver
. The call
should not be
already started. After calling this method, call
should no longer be used.public static <ReqT,RespT> void asyncServerStreamingCall(ClientCall<ReqT,RespT> call, ReqT req, StreamObserver<RespT> responseObserver)
StreamObserver
. The call
should not be already started. After calling this method, call
should no longer be
used.public static <ReqT,RespT> StreamObserver<ReqT> asyncClientStreamingCall(ClientCall<ReqT,RespT> call, StreamObserver<RespT> responseObserver)
StreamObserver
for the request messages.
The call
should not be already started. After calling this method, call
should no longer be used.public static <ReqT,RespT> StreamObserver<ReqT> asyncBidiStreamingCall(ClientCall<ReqT,RespT> call, StreamObserver<RespT> responseObserver)
call
should not be already started.
After calling this method, call
should no longer be used.public static <ReqT,RespT> RespT blockingUnaryCall(ClientCall<ReqT,RespT> call, ReqT req)
call
should not be already
started. After calling this method, call
should no longer be used.public static <ReqT,RespT> RespT blockingUnaryCall(Channel channel, MethodDescriptor<ReqT,RespT> method, CallOptions callOptions, ReqT req)
call
should not be already
started. After calling this method, call
should no longer be used.public static <ReqT,RespT> Iterator<RespT> blockingServerStreamingCall(ClientCall<ReqT,RespT> call, ReqT req)
Iterator
over the
response stream. The call
should not be already started. After calling this method,
call
should no longer be used.public static <ReqT,RespT> Iterator<RespT> blockingServerStreamingCall(Channel channel, MethodDescriptor<ReqT,RespT> method, CallOptions callOptions, ReqT req)
Iterator
over the
response stream. The call
should not be already started. After calling this method,
call
should no longer be used.public static <ReqT,RespT> com.google.common.util.concurrent.ListenableFuture<RespT> futureUnaryCall(ClientCall<ReqT,RespT> call, ReqT req)
ListenableFuture
to the response. The
call
should not be already started. After calling this method, call
should no
longer be used.Copyright © 2018. All rights reserved.