Class GrpcBeanInitializer

java.lang.Object
org.wildfly.extras.a2a.server.apps.grpc.GrpcBeanInitializer

@ApplicationScoped public class GrpcBeanInitializer extends Object
Bean initializer that observes application startup events. Since CDI is not available on gRPC threads, we capture the CDI beans during application startup and store them statically for use by the WildFly gRPC subsystem.
  • Constructor Details

    • GrpcBeanInitializer

      public GrpcBeanInitializer()
  • Method Details

    • onStartup

      public void onStartup(@Observes @Initialized(jakarta.enterprise.context.ApplicationScoped.class) Object init)
      Observes the application startup event to eagerly initialize the gRPC cache.
    • cleanup

      @PreDestroy public void cleanup()