Class GrpcMethodHandler


  • public class GrpcMethodHandler
    extends Object
    Handles gRPC service method invocations
    • Constructor Detail

      • GrpcMethodHandler

        public GrpcMethodHandler​(GrpcConsumer consumer)
    • Method Detail

      • handle

        public void handle​(Object body,
                           io.grpc.stub.StreamObserver<Object> responseObserver,
                           String methodName)
                    throws Exception
        This method deals with the unary and server streaming gRPC calls
        Parameters:
        body - The request object sent by the gRPC client to the server
        responseObserver - The response stream observer
        methodName - The name of the method invoked using the stub.
        Throws:
        Exception - java.lang.Exception
      • handleForConsumerStrategy

        public io.grpc.stub.StreamObserver<Object> handleForConsumerStrategy​(io.grpc.stub.StreamObserver<Object> responseObserver,
                                                                             String methodName)
        This method deals with the client streaming and bi-directional streaming gRPC calls
        Parameters:
        responseObserver - The response stream observer
        methodName - The name of the method invoked using the stub.
        Returns:
        Request stream observer