@Configuration(proxyBeanMethods=false) @ConditionalOnMissingBean(value={GrpcServerFactory.class,GrpcServerLifecycle.class}) @AutoConfigureAfter(value=GrpcServerAutoConfiguration.class) public class GrpcServerFactoryAutoConfiguration extends Object
GrpcServerFactory
s and GrpcServerLifecycle
s, if the
developer hasn't specified their own variant.Constructor and Description |
---|
GrpcServerFactoryAutoConfiguration() |
@ConditionalOnClass(name={"io.grpc.netty.shaded.io.netty.channel.Channel","io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder"}) @Conditional(value=ConditionalOnInterprocessServer.class) @Bean public ShadedNettyGrpcServerFactory shadedNettyGrpcServerFactory(GrpcServerProperties properties, GrpcServiceDiscoverer serviceDiscoverer, List<GrpcServerConfigurer> serverConfigurers)
properties
- The properties used to configure the server.serviceDiscoverer
- The discoverer used to identify the services that should be served.serverConfigurers
- The server configurers that contain additional configuration for the server.@ConditionalOnBean(value=ShadedNettyGrpcServerFactory.class) @Bean public GrpcServerLifecycle shadedNettyGrpcServerLifecycle(ShadedNettyGrpcServerFactory factory, GrpcServerProperties properties, ApplicationEventPublisher eventPublisher)
factory
- The factory used to create the lifecycle.properties
- The server properties to use.eventPublisher
- The event publisher to use.@ConditionalOnMissingBean(value=ShadedNettyGrpcServerFactory.class) @Conditional(value=ConditionalOnInterprocessServer.class) @ConditionalOnClass(name={"io.netty.channel.Channel","io.grpc.netty.NettyServerBuilder"}) @Bean public NettyGrpcServerFactory nettyGrpcServerFactory(GrpcServerProperties properties, GrpcServiceDiscoverer serviceDiscoverer, List<GrpcServerConfigurer> serverConfigurers)
properties
- The properties used to configure the server.serviceDiscoverer
- The discoverer used to identify the services that should be served.serverConfigurers
- The server configurers that contain additional configuration for the server.@ConditionalOnBean(value=NettyGrpcServerFactory.class) @Bean public GrpcServerLifecycle nettyGrpcServerLifecycle(NettyGrpcServerFactory factory, GrpcServerProperties properties, ApplicationEventPublisher eventPublisher)
factory
- The factory used to create the lifecycle.properties
- The server properties to use.eventPublisher
- The event publisher to use.@ConditionalOnProperty(prefix="grpc.server", name="in-process-name") @Bean public InProcessGrpcServerFactory inProcessGrpcServerFactory(GrpcServerProperties properties, GrpcServiceDiscoverer serviceDiscoverer)
properties
- The properties used to configure the server.serviceDiscoverer
- The discoverer used to identify the services that should be served.@ConditionalOnBean(value=InProcessGrpcServerFactory.class) @Bean public GrpcServerLifecycle inProcessGrpcServerLifecycle(InProcessGrpcServerFactory factory, GrpcServerProperties properties, ApplicationEventPublisher eventPublisher)
factory
- The factory used to create the lifecycle.properties
- The server properties to use.eventPublisher
- The event publisher to use.