Class GrpcClientFactory

java.lang.Object
org.springframework.grpc.client.GrpcClientFactory
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class GrpcClientFactory extends Object implements org.springframework.context.ApplicationContextAware
A factory of gRPC clients that can be used to create client stubs as beans in an application context.
Author:
Dave Syer
  • Constructor Details

    • GrpcClientFactory

      public GrpcClientFactory()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • getClient

      public <T> T getClient(String target, Class<T> type, Class<?> factory)
    • findStubFactoryTypes

      public static HashSet<Class<?>> findStubFactoryTypes(org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
    • register

      public static void register(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, GrpcClientFactory.GrpcClientRegistrationSpec spec)