@ConditionalOnBean(InProcessGrpcServerFactory.class)
    @Bean
    public GrpcServerLifecycle inProcessGrpcServerLifecycle(
            final InProcessGrpcServerFactory factory,
            final GrpcServerProperties properties,
            ApplicationEventPublisher eventPublisher) {

        return new GrpcServerLifecycle(factory, properties.getShutdownGracePeriod(), eventPublisher);
    }
The server lifecycle bean for the in-process-server.

@param factory The factory used to create the lifecycle.
@param properties The server properties to use.
@param eventPublisher The event publisher to use.
@return The in-process server lifecycle bean.
grpc-server-spring-boot-starter/src/main/java/net/devh/boot/grpc/server/autoconfigure/GrpcServerFactoryAutoConfiguration.java