Package org.apache.camel.component.grpc
Class GrpcUtils
java.lang.Object
org.apache.camel.component.grpc.GrpcUtils
GrpcUtils helpers are working with dynamic methods via Camel and Java reflection utilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
addClientCallCredentials
(Object grpcStub, io.grpc.CallCredentials creds) static Object
constructGrpcAsyncStub
(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context) static Object
constructGrpcBlockingStub
(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context) static Class
constructGrpcImplBaseClass
(String packageName, String serviceName, org.apache.camel.CamelContext context) static String
convertMethod2CamelCase
(String method) Migrated MixedLower function from the gRPC converting plugin source code (https://github.com/grpc/grpc-java/blob/master/compiler/src/java_plugin/cpp/java_generator.cpp) - decapitalize the first letter - remove embedded underscores & capitalize the following letterstatic String
extractServiceName
(String service) static String
extractServicePackage
(String service) static void
invokeAsyncMethod
(Object asyncStubClass, String invokeMethod, Object request, io.grpc.stub.StreamObserver responseObserver) static io.grpc.stub.StreamObserver<Object>
invokeAsyncMethodStreaming
(Object asyncStubClass, String invokeMethod, io.grpc.stub.StreamObserver<?> responseObserver) static Object
invokeSyncMethod
(Object blockingStubClass, String invokeMethod, Object request)
-
Method Details
-
extractServiceName
-
extractServicePackage
-
constructGrpcAsyncStub
-
constructGrpcBlockingStub
-
addClientCallCredentials
-
constructGrpcImplBaseClass
-
invokeAsyncMethod
-
invokeAsyncMethodStreaming
-
invokeSyncMethod
-
convertMethod2CamelCase
Migrated MixedLower function from the gRPC converting plugin source code (https://github.com/grpc/grpc-java/blob/master/compiler/src/java_plugin/cpp/java_generator.cpp) - decapitalize the first letter - remove embedded underscores & capitalize the following letter
-