public class GrpcMethodHandler extends Object
| Modifier and Type | Field and Description |
|---|---|
protected GrpcConsumer |
consumer |
| Constructor and Description |
|---|
GrpcMethodHandler(GrpcConsumer consumer) |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(Object body,
io.grpc.stub.StreamObserver<Object> responseObserver,
String methodName)
This method deals with the unary and server streaming gRPC calls
|
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
|
protected final GrpcConsumer consumer
public GrpcMethodHandler(GrpcConsumer consumer)
public void handle(Object body, io.grpc.stub.StreamObserver<Object> responseObserver, String methodName) throws Exception
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.Exception - java.lang.Exceptionpublic io.grpc.stub.StreamObserver<Object> handleForConsumerStrategy(io.grpc.stub.StreamObserver<Object> responseObserver, String methodName)
responseObserver - The response stream observermethodName - The name of the method invoked using the stub.Apache Camel