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 runningGrpcServer
an in-processChannel
.
-
-
Constructor Summary
Constructors Constructor Description ServerProducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.Channel
channel()
Produces an in-processChannel
to connect to the running gRPC server.io.grpc.inprocess.InProcessChannelBuilder
channelBuilder()
Produces an in-processInProcessChannelBuilder
to connect to the running gRPC server.GrpcServer
server()
Produce theGrpcServer
.Supplier<GrpcServer>
supply()
Produce aSupplier
that can supply theGrpcServer
.
-
-
-
Method Detail
-
server
@Produces public GrpcServer server()
Produce theGrpcServer
.- Returns:
- the
GrpcServer
-
supply
@Produces public Supplier<GrpcServer> supply()
Produce aSupplier
that can supply theGrpcServer
.This could be useful where an injection point has the server injected before the
GrpcServerCdiExtension.startServer(java.lang.Object, javax.enterprise.inject.spi.BeanManager)
method has actually started it. In that case aSupplier<GrpcServer>
can be injected instead that will be able to lazily supply the server.- Returns:
- a
Supplier
that can supply theGrpcServer
-
channel
@Produces public io.grpc.Channel channel()
Produces an in-processChannel
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-processInProcessChannelBuilder
to connect to the running gRPC server.- Returns:
- an in-process
InProcessChannelBuilder
to connect to the running gRPC server
-
-