public class NettyChannelFactory extends AbstractChannelFactory<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 void |
configureSecurity(NettyChannelBuilder builder,
String name)
Configures the security options that should be used by the channel.
|
protected NettyChannelBuilder |
newChannelBuilder(String name)
Creates a new
ManagedChannelBuilder for the given client name. |
protected static 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, 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 NettyChannelBuilder newChannelBuilder(String name)
AbstractChannelFactoryManagedChannelBuilder for the given client name.newChannelBuilder in class AbstractChannelFactory<NettyChannelBuilder>name - The name to create the channel builder for.protected void configureSecurity(NettyChannelBuilder builder, String name)
AbstractChannelFactoryconfigureSecurity in class AbstractChannelFactory<NettyChannelBuilder>builder - The channel builder to configure.name - The name of the client to configure.protected static NegotiationType of(NegotiationType negotiationType)
negotiationType - The negotiation type to convert.