Class ShadedNettyGrpcChannelFactory

java.lang.Object
org.springframework.grpc.client.DefaultGrpcChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
org.springframework.grpc.client.ShadedNettyGrpcChannelFactory
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, GrpcChannelFactory

public class ShadedNettyGrpcChannelFactory extends DefaultGrpcChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
GrpcChannelFactory that creates shaded Netty-based gRPC channels.
Author:
Chris Bono
  • Constructor Details

    • ShadedNettyGrpcChannelFactory

      public ShadedNettyGrpcChannelFactory(List<GrpcChannelBuilderCustomizer<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>> globalCustomizers, ClientInterceptorsConfigurer interceptorsConfigurer)
      Construct a channel factory instance.
      Parameters:
      globalCustomizers - the global customizers to apply to all created channels
      interceptorsConfigurer - configures the client interceptors on the created channels
  • Method Details

    • newChannelBuilder

      protected io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder newChannelBuilder(String path, io.grpc.ChannelCredentials credentials)
      Description copied from class: DefaultGrpcChannelFactory
      Creates a new ManagedChannelBuilder instance for the given target and credentials. The target is a valid nameresolver-compliant URI or an authority string as described in Grpc.newChannelBuilder(String, ChannelCredentials).
      Overrides:
      newChannelBuilder in class DefaultGrpcChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
      Parameters:
      path - the target of the channel
      credentials - the credentials for the channel
      Returns:
      a new builder for the given target and credentials