Class GrpcServerCdiExtension.ServerProducer
java.lang.Object
io.helidon.microprofile.grpc.server.GrpcServerCdiExtension.ServerProducer
- Enclosing class:
- GrpcServerCdiExtension
A CDI producer that can supply the running
GrpcServer
an in-process Channel
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionio.grpc.Channel
channel()
Produces an in-processChannel
to connect to the running gRPC server.io.grpc.inprocess.InProcessChannelBuilder
Produces an in-processInProcessChannelBuilder
to connect to the running gRPC server.server()
Produce theGrpcServer
.supply()
Produce aSupplier
that can supply theGrpcServer
.
-
Constructor Details
-
ServerProducer
public ServerProducer()
-
-
Method Details
-
server
Produce theGrpcServer
.- Returns:
- the
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, jakarta.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 an in-processChannel
to connect to the running gRPC server.- Returns:
- an in-process
Channel
to connect to the running gRPC server
-
channelBuilder
Produces an in-processInProcessChannelBuilder
to connect to the running gRPC server.- Returns:
- an in-process
InProcessChannelBuilder
to connect to the running gRPC server
-