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
-
Field Summary
Fields inherited from class DefaultGrpcChannelFactory
targets -
Constructor Summary
ConstructorsConstructorDescriptionShadedNettyGrpcChannelFactory(List<GrpcChannelBuilderCustomizer<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>> globalCustomizers, ClientInterceptorsConfigurer interceptorsConfigurer) Construct a channel factory instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuildernewChannelBuilder(String path, io.grpc.ChannelCredentials credentials) Creates a newManagedChannelBuilderinstance for the given target and credentials.Methods inherited from class DefaultGrpcChannelFactory
createChannel, destroy, setCredentialsProvider, setInterceptorFilter, setVirtualTargets, supports, supportsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GrpcChannelFactory
createChannel
-
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 channelsinterceptorsConfigurer- 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:DefaultGrpcChannelFactoryCreates a newManagedChannelBuilderinstance for the given target and credentials. Thetargetis a valid nameresolver-compliant URI or an authority string as described inGrpc.newChannelBuilder(String, ChannelCredentials).- Overrides:
newChannelBuilderin classDefaultGrpcChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>- Parameters:
path- the target of the channelcredentials- the credentials for the channel- Returns:
- a new builder for the given target and credentials
-