Class GrpcMethodHandler
java.lang.Object
org.apache.camel.component.grpc.server.GrpcMethodHandler
Handles gRPC service method invocations
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method deals with the unary and server streaming gRPC callsio.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
-
Field Details
-
consumer
-
-
Constructor Details
-
GrpcMethodHandler
-
-
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 serverresponseObserver
- The response stream observermethodName
- 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 observermethodName
- The name of the method invoked using the stub.- Returns:
- Request stream observer
-