Class GrpcServerCdiExtension.ServerProducer

java.lang.Object
io.helidon.microprofile.grpc.server.GrpcServerCdiExtension.ServerProducer
Enclosing class:
GrpcServerCdiExtension

@ApplicationScoped public static class GrpcServerCdiExtension.ServerProducer extends Object
A CDI producer that can supply the running GrpcServer an in-process Channel.
  • Constructor Details

    • ServerProducer

      public ServerProducer()
  • Method Details

    • server

      @Produces public GrpcServer server()
      Produce the GrpcServer.
      Returns:
      the GrpcServer
    • supply

      @Produces public Supplier<GrpcServer> supply()
      Produce a Supplier that can supply the GrpcServer.

      This could be useful where an injection point has the server injected before the GrpcServerCdiExtension.startServer(java.lang.Object, jakarta.enterprise.inject.spi.BeanManager) method has actually started it. In that case a Supplier<GrpcServer> can be injected instead that will be able to lazily supply the server.

      Returns:
      a Supplier that can supply the GrpcServer
    • channel

      @Produces public io.grpc.Channel channel()
      Produces an in-process Channel to connect to the running gRPC server.
      Returns:
      an in-process Channel to connect to the running gRPC server
    • channelBuilder

      @Produces public io.grpc.inprocess.InProcessChannelBuilder channelBuilder()
      Produces an in-process InProcessChannelBuilder to connect to the running gRPC server.
      Returns:
      an in-process InProcessChannelBuilder to connect to the running gRPC server