Interface GrpcServiceClient


public interface GrpcServiceClient
Client for a single service.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <ReqT, ResT>
    io.grpc.stub.StreamObserver<ReqT>
    bidi(String methodName, io.grpc.stub.StreamObserver<ResT> response)
    gRPC bidirectional call using StreamObserver.
    <ReqT, ResT>
    Iterator<ResT>
    bidi(String methodName, Iterator<ReqT> request)
    gRPC bidirectional call using Iterator.
    <ReqT, ResT>
    io.grpc.stub.StreamObserver<ReqT>
    clientStream(String methodName, io.grpc.stub.StreamObserver<ResT> response)
    Asynchronous gRPC client stream call.
    <ReqT, ResT>
    ResT
    clientStream(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>
    void
    serverStream(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>
    ResT
    unary(String methodName, ReqT request)
    Blocking gRPC unary call.
    <ReqT, ResT>
    void
    unary(String methodName, ReqT request, io.grpc.stub.StreamObserver<ResT> response)
    Asynchronous gRPC unary call.
  • Method Details

    • serviceName

      String serviceName()
      Name of the service this client was created for.
      Returns:
      service name
    • unary

      <ReqT, ResT> ResT unary(String methodName, ReqT request)
      Blocking gRPC unary call.
      Type Parameters:
      ReqT - type of request
      ResT - type of response
      Parameters:
      methodName - method name
      request - 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 request
      ResT - type of response
      Parameters:
      methodName - method name
      request - the request
      response - the response observer
    • serverStream

      <ReqT, ResT> Iterator<ResT> serverStream(String methodName, ReqT request)
      Blocking gRPC server stream call.
      Type Parameters:
      ReqT - type of request
      ResT - type of response
      Parameters:
      methodName - method name
      request - 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 request
      ResT - type of response
      Parameters:
      methodName - method name
      request - the request
      response - the response observer
    • clientStream

      <ReqT, ResT> ResT clientStream(String methodName, Iterator<ReqT> request)
      Blocking gRPC client stream call.
      Type Parameters:
      ReqT - type of request
      ResT - type of response
      Parameters:
      methodName - method name
      request - 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 request
      ResT - type of response
      Parameters:
      methodName - method name
      response - the response observer
      Returns:
      the request observer
    • bidi

      <ReqT, ResT> Iterator<ResT> bidi(String methodName, Iterator<ReqT> request)
      gRPC bidirectional call using Iterator.
      Type Parameters:
      ReqT - type of request
      ResT - type of response
      Parameters:
      methodName - method name
      request - 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 using StreamObserver.
      Type Parameters:
      ReqT - type of request
      ResT - type of response
      Parameters:
      methodName - method name
      response - the response observer
      Returns:
      the request observer