Class GrpcClientProperties

java.lang.Object
org.springframework.boot.grpc.client.autoconfigure.GrpcClientProperties
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.EnvironmentAware, VirtualTargets

@ConfigurationProperties(prefix="spring.grpc.client") public class GrpcClientProperties extends Object implements org.springframework.context.EnvironmentAware, VirtualTargets
Configuration properties for the gRPC client side.
Author:
Dave Syer, Chris Bono, Vahid Ramezani
  • Method Details

    • getChannels

    • getDefaultChannel

      public GrpcClientProperties.ChannelConfig getDefaultChannel()
    • getDefaultStubFactory

      public Class<? extends StubFactory<?>> getDefaultStubFactory()
    • setDefaultStubFactory

      public void setDefaultStubFactory(Class<? extends StubFactory<?>> defaultStubFactory)
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • getChannel

      public GrpcClientProperties.ChannelConfig getChannel(String name)
      Gets the configured channel with the given name. If no channel is configured for the specified name then one is created using the default channel as a template.
      Parameters:
      name - the name of the channel
      Returns:
      the configured channel if found, or a newly created channel using the default channel as a template
    • getTarget

      public String getTarget(String authority)
      Specified by:
      getTarget in interface VirtualTargets