public interface GrpcServiceClient
Client for a single service.
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<ReqT,
ResT>
io.grpc.stub.StreamObserver<ReqT> gRPC bidirectional call usingStreamObserver
.<ReqT,
ResT>
Iterator<ResT> gRPC bidirectional call usingIterator
.<ReqT,
ResT>
io.grpc.stub.StreamObserver<ReqT> clientStream
(String methodName, io.grpc.stub.StreamObserver<ResT> response) Asynchronous gRPC client stream call.<ReqT,
ResT>
ResTclientStream
(String methodName, Iterator<ReqT> request) Blocking gRPC client stream call.<ReqT,
ResT>
Iterator<ResT> serverStream
(String methodName, ReqT request) Blocking gRPC server stream call.<ReqT,
ResT>
voidserverStream
(String methodName, ReqT request, io.grpc.stub.StreamObserver<ResT> response) Asynchronous gRPC server stream call.Name of the service this client was created for.<ReqT,
ResT>
ResTBlocking gRPC unary call.<ReqT,
ResT>
voidAsynchronous gRPC unary call.
-
Method Details
-
serviceName
String serviceName()Name of the service this client was created for.- Returns:
- service name
-
unary
Blocking gRPC unary call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- the request- Returns:
- the response
-
unary
<ReqT,ResT> void unary(String methodName, ReqT request, io.grpc.stub.StreamObserver<ResT> response) Asynchronous gRPC unary call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- the requestresponse
- the response observer
-
serverStream
Blocking gRPC server stream call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- the request- Returns:
- the response iterator
-
serverStream
<ReqT,ResT> void serverStream(String methodName, ReqT request, io.grpc.stub.StreamObserver<ResT> response) Asynchronous gRPC server stream call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- the requestresponse
- the response observer
-
clientStream
Blocking gRPC client stream call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- the request iterator- Returns:
- the response
-
clientStream
<ReqT,ResT> io.grpc.stub.StreamObserver<ReqT> clientStream(String methodName, io.grpc.stub.StreamObserver<ResT> response) Asynchronous gRPC client stream call.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method nameresponse
- the response observer- Returns:
- the request observer
-
bidi
gRPC bidirectional call usingIterator
.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method namerequest
- request iterator- Returns:
- response iterator
-
bidi
<ReqT,ResT> io.grpc.stub.StreamObserver<ReqT> bidi(String methodName, io.grpc.stub.StreamObserver<ResT> response) gRPC bidirectional call usingStreamObserver
.- Type Parameters:
ReqT
- type of requestResT
- type of response- Parameters:
methodName
- method nameresponse
- the response observer- Returns:
- the request observer
-