public class NettyChannelFactory extends AbstractChannelFactory<io.grpc.netty.NettyChannelBuilder>
GrpcChannelFactorys.
This class utilizes connection pooling and thus needs to be closed after usage.
channelConfigurers, globalClientInterceptorRegistry| Constructor and Description |
|---|
NettyChannelFactory(GrpcChannelsProperties properties,
GlobalClientInterceptorRegistry globalClientInterceptorRegistry,
List<GrpcChannelConfigurer> channelConfigurers)
Creates a new GrpcChannelFactory for netty with the given options.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
configureAcceptedServerCertificates(GrpcChannelProperties.Security security,
io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
Configures the server certificates accepted by the ssl context.
|
protected static void |
configureProvidedClientCertificate(GrpcChannelProperties.Security security,
io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
Configures the client certificate provided by the ssl context.
|
protected void |
configureSecurity(io.grpc.netty.NettyChannelBuilder builder,
String name)
Configures the security options that should be used by the channel.
|
protected io.grpc.netty.NettyChannelBuilder |
newChannelBuilder(String name)
Creates a new
ManagedChannelBuilder for the given client name. |
protected static 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, getDefaultScheme, getPropertiesFor, isNonNullAndNonBlank, newManagedChannel, watchConnectivityStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateChannelpublic NettyChannelFactory(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.NettyChannelBuilder newChannelBuilder(String name)
AbstractChannelFactoryManagedChannelBuilder for the given client name.newChannelBuilder in class AbstractChannelFactory<io.grpc.netty.NettyChannelBuilder>name - The name to create the channel builder for.protected void configureSecurity(io.grpc.netty.NettyChannelBuilder builder,
String name)
AbstractChannelFactoryconfigureSecurity in class AbstractChannelFactory<io.grpc.netty.NettyChannelBuilder>builder - The channel builder to configure.name - The name of the client to configure.protected static void configureProvidedClientCertificate(GrpcChannelProperties.Security security, io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
security - The security configuration to use.sslContextBuilder - The ssl context builder to configure.protected static void configureAcceptedServerCertificates(GrpcChannelProperties.Security security, io.netty.handler.ssl.SslContextBuilder sslContextBuilder)
security - The security configuration to use.sslContextBuilder - The ssl context builder to configure.protected static io.grpc.netty.NegotiationType of(NegotiationType negotiationType)
negotiationType - The negotiation type to convert.