Class GrpcClientUtils


  • public class GrpcClientUtils
    extends Object
    gRPC client utilities
    • Constructor Detail

      • GrpcClientUtils

        public GrpcClientUtils()
    • Method Detail

      • attachHeaders

        public static <T> T attachHeaders​(T client,
                                          io.grpc.Metadata extraHeaders)
        Attach headers to a gRPC client. To make a call with headers, first invoke this method and then perform the intended call with the returned client
        Type Parameters:
        T - type of the client
        Parameters:
        client - any kind of gRPC client
        extraHeaders - headers to attach
        Returns:
        a client with headers attached
      • getProxiedObject

        public static <T> T getProxiedObject​(T client)