public class ShadedNettyChannelFactory extends AbstractChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
GrpcChannelFactory
s.
This class utilizes connection pooling and thus needs to be closed
after usage.
channelConfigurers, globalClientInterceptorRegistry
Constructor and Description |
---|
ShadedNettyChannelFactory(GrpcChannelsProperties properties,
GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
List<GrpcChannelConfigurer> channelConfigurers)
Creates a new GrpcChannelFactory for shaded netty with the given options.
|
Modifier and Type | Method and Description |
---|---|
protected void |
configureSecurity(io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder builder,
String name)
Configures the security options that should be used by the channel.
|
protected io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder |
newChannelBuilder(String name)
Creates a new
ManagedChannelBuilder for the given client name. |
protected static io.grpc.netty.shaded.io.grpc.netty.NegotiationType |
of(NegotiationType negotiationType)
Converts the given negotiation type to netty's negotiation type.
|
close, configure, configureCompression, configureKeepAlive, configureLimits, createChannel, createChannel, getConnectivityState, getPropertiesFor, isNonNullAndNonBlank, newManagedChannel, watchConnectivityState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createChannel
public ShadedNettyChannelFactory(GrpcChannelsProperties properties, GlobalClientInterceptorRegistry globalClientInterceptorRegistry, List<GrpcChannelConfigurer> channelConfigurers)
properties
- The properties for the channels to create.globalClientInterceptorRegistry
- The interceptor registry to use.channelConfigurers
- The channel configurers to use. Can be empty.protected io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder newChannelBuilder(String name)
AbstractChannelFactory
ManagedChannelBuilder
for the given client name.newChannelBuilder
in class AbstractChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
name
- The name to create the channel builder for.protected void configureSecurity(io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder builder, String name)
AbstractChannelFactory
configureSecurity
in class AbstractChannelFactory<io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder>
builder
- The channel builder to configure.name
- The name of the client to configure.protected static io.grpc.netty.shaded.io.grpc.netty.NegotiationType of(NegotiationType negotiationType)
negotiationType
- The negotiation type to convert.