@Configuration @EnableConfigurationProperties(value=GRpcServerProperties.class) @AutoConfigureAfter(name="com.netflix.springboot.grpc.server.GrpcServerAutoConfiguration") public class AgentRpcServersAutoConfiguration extends java.lang.Object
| Constructor and Description |
|---|
AgentRpcServersAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
io.grpc.Server |
gRpcServer(int port,
java.util.Set<io.grpc.BindableService> services,
java.util.List<io.grpc.ServerInterceptor> serverInterceptors)
Create a
Server if one isn't already present in the context. |
GRpcServerManager |
gRpcServerManager(io.grpc.Server server)
Create a
GRpcServerManager instance to manage the lifecycle of the gRPC server if one isn't already
defined. |
@Bean
@ConditionalOnMissingBean(value=io.grpc.Server.class)
public io.grpc.Server gRpcServer(@Value(value="${grpc.server.port:0}")
int port,
java.util.Set<io.grpc.BindableService> services,
java.util.List<io.grpc.ServerInterceptor> serverInterceptors)
Server if one isn't already present in the context.port - The port this server should listen onservices - The gRPC services this server should serveserverInterceptors - The ServerInterceptor implementations that should be applied to all services@Bean @ConditionalOnMissingBean(value=GRpcServerManager.class) public GRpcServerManager gRpcServerManager(io.grpc.Server server)
GRpcServerManager instance to manage the lifecycle of the gRPC server if one isn't already
defined.server - The Server instance to manageGRpcServerManager instance