Class AgentRpcServersAutoConfiguration
java.lang.Object
com.netflix.genie.web.spring.autoconfigure.agent.apis.rpc.servers.AgentRpcServersAutoConfiguration
@Configuration
@EnableConfigurationProperties(GRpcServerProperties.class)
@AutoConfigureAfter(name="com.netflix.springboot.grpc.server.GrpcServerAutoConfiguration")
public class AgentRpcServersAutoConfiguration
extends Object
Controls whether a gRPC server is configured and started for this Genie node or not.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.ServergRpcServer(int port, Set<io.grpc.BindableService> services, List<io.grpc.ServerInterceptor> serverInterceptors, brave.Tracing tracing) Create aServerif one isn't already present in the context.gRpcServerManager(io.grpc.Server server) Create aGRpcServerManagerinstance to manage the lifecycle of the gRPC server if one isn't already defined.
-
Constructor Details
-
AgentRpcServersAutoConfiguration
public AgentRpcServersAutoConfiguration()
-
-
Method Details
-
gRpcServer
@Bean @ConditionalOnMissingBean(io.grpc.Server.class) public io.grpc.Server gRpcServer(@Value("${grpc.server.port:0}") int port, Set<io.grpc.BindableService> services, List<io.grpc.ServerInterceptor> serverInterceptors, brave.Tracing tracing) Create aServerif one isn't already present in the context.- Parameters:
port- The port this server should listen onservices- The gRPC services this server should serveserverInterceptors- TheServerInterceptorimplementations that should be applied to all servicestracing- The BraveTracinginstance to use- Returns:
- A Netty server instance based on the provided information
-
gRpcServerManager
@Bean @ConditionalOnMissingBean(GRpcServerManager.class) public GRpcServerManager gRpcServerManager(io.grpc.Server server) Create aGRpcServerManagerinstance to manage the lifecycle of the gRPC server if one isn't already defined.- Parameters:
server- TheServerinstance to manage- Returns:
- A
GRpcServerManagerinstance
-