Class CustomGrpcDescriptor


  • public class CustomGrpcDescriptor
    extends java.lang.Object
    Herts gRPC custom static descriptor.
    • Constructor Detail

      • CustomGrpcDescriptor

        public CustomGrpcDescriptor()
    • Method Detail

      • generateMethodDescriptor

        public static io.grpc.MethodDescriptor<byte[],​byte[]> generateMethodDescriptor​(HertsType coreType,
                                                                                             java.lang.String serviceName,
                                                                                             java.lang.String methodName)
        Generate method descriptor.
        Parameters:
        coreType - HertsCoreType
        serviceName - Interface service name
        methodName - Rpc name
        Returns:
        MethodDescriptor
      • generateStramingMethodDescriptor

        public static io.grpc.MethodDescriptor<java.lang.Object,​java.lang.Object> generateStramingMethodDescriptor​(HertsType coreType,
                                                                                                                         java.lang.String serviceName,
                                                                                                                         java.lang.String methodName)
        Generate straeming method descriptor
        Parameters:
        coreType - HertsType
        serviceName - Service name
        methodName - Method name
        Returns:
        MethodDescriptor
      • generateGrpcDescriptor

        public static CustomGrpcUnaryDescriptor generateGrpcDescriptor​(java.lang.String serviceName,
                                                                       java.util.List<RegisteredMethod> hertsMethods)
        Generate gRPC unary descriptor.
        Parameters:
        serviceName - Interface service name
        hertsMethods - HertMethod class list
        Returns:
        HertsDescriptor
      • generateStreamingGrpcDescriptor

        public static CustomGrpcStreamingDescriptor generateStreamingGrpcDescriptor​(java.lang.String serviceName,
                                                                                    java.util.List<RegisteredMethod> hertsMethods)
        Generate gRPC client, server, bidirectional streaming descriptor.
        Parameters:
        serviceName - Interface service name
        hertsMethods - HertMethod class list
        Returns:
        HertsStreamingDescriptor