Class GrpcClientCdiExtension
java.lang.Object
io.helidon.microprofile.grpc.client.GrpcClientCdiExtension
- All Implemented Interfaces:
Extension
A CDI extension to add gRPC client functionality.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBeans
(BeforeBeanDiscovery event) Adds beans to the bean manager.void
afterBean
(AfterBeanDiscovery event, BeanManager beanManager) Process the previously capturedGrpc.GrpcProxy
injection points.<T,
X> void gatherApplications
(ProcessInjectionPoint<T, X> pip) Process injection points.
-
Constructor Details
-
GrpcClientCdiExtension
public GrpcClientCdiExtension()
-
-
Method Details
-
addBeans
Adds beans to the bean manager.- Parameters:
event
- before bean discovery event
-
gatherApplications
Process injection points.In this method injection points that have the
Grpc.GrpcProxy
are processed and their types are stored so that in theafterBean(jakarta.enterprise.inject.spi.AfterBeanDiscovery, jakarta.enterprise.inject.spi.BeanManager)
we can manually create a producer for the correct service proxy type.- Type Parameters:
T
- the bean class of the bean that declares the injection pointX
- the declared type of the injection point.- Parameters:
pip
- the injection point
-
afterBean
Process the previously capturedGrpc.GrpcProxy
injection points.For each
Grpc.GrpcProxy
injection point we create a producer bean for the required type.- Parameters:
event
- theAfterBeanDiscovery
eventbeanManager
- the CDI bean manager
-