Class GrpcMethodHandler

java.lang.Object
org.apache.camel.component.grpc.server.GrpcMethodHandler

public class GrpcMethodHandler extends Object
Handles gRPC service method invocations
  • Field Details

  • Constructor Details

    • GrpcMethodHandler

      public GrpcMethodHandler(GrpcConsumer consumer)
  • Method Details

    • 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