Package org.apache.camel.component.grpc
Class GrpcUtils
- java.lang.Object
-
- org.apache.camel.component.grpc.GrpcUtils
-
public final class GrpcUtils extends Object
GrpcUtils helpers are working with dynamic methods via Camel and Java reflection utilities
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectaddClientCallCredentials(Object grpcStub, io.grpc.CallCredentials creds)static ObjectconstructGrpcAsyncStub(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context)static ObjectconstructGrpcBlockingStub(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context)static ClassconstructGrpcImplBaseClass(String packageName, String serviceName, org.apache.camel.CamelContext context)static StringconvertMethod2CamelCase(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 StringextractServiceName(String service)static StringextractServicePackage(String service)static voidinvokeAsyncMethod(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 ObjectinvokeSyncMethod(Object blockingStubClass, String invokeMethod, Object request)
-
-
-
Method Detail
-
constructGrpcAsyncStub
public static Object constructGrpcAsyncStub(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context)
-
constructGrpcBlockingStub
public static Object constructGrpcBlockingStub(String packageName, String serviceName, io.grpc.Channel channel, io.grpc.CallCredentials creds, org.apache.camel.CamelContext context)
-
addClientCallCredentials
public static Object addClientCallCredentials(Object grpcStub, io.grpc.CallCredentials creds)
-
constructGrpcImplBaseClass
public static Class constructGrpcImplBaseClass(String packageName, String serviceName, org.apache.camel.CamelContext context)
-
invokeAsyncMethod
public static void invokeAsyncMethod(Object asyncStubClass, String invokeMethod, Object request, io.grpc.stub.StreamObserver responseObserver)
-
invokeAsyncMethodStreaming
public static io.grpc.stub.StreamObserver<Object> invokeAsyncMethodStreaming(Object asyncStubClass, String invokeMethod, io.grpc.stub.StreamObserver<?> responseObserver)
-
invokeSyncMethod
public static Object invokeSyncMethod(Object blockingStubClass, String invokeMethod, Object request)
-
convertMethod2CamelCase
public 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 letter
-
-