Class GrpcClientCdiExtension
- java.lang.Object
-
- io.helidon.microprofile.grpc.client.GrpcClientCdiExtension
-
- All Implemented Interfaces:
javax.enterprise.inject.spi.Extension
public class GrpcClientCdiExtension extends Object implements javax.enterprise.inject.spi.Extension
A CDI extension to add gRPC client functionality.
-
-
Constructor Summary
Constructors Constructor Description GrpcClientCdiExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterBean(javax.enterprise.inject.spi.AfterBeanDiscovery event, javax.enterprise.inject.spi.BeanManager beanManager)Process the previously capturedGrpcProxyinjection points.<T,X>
voidgatherApplications(javax.enterprise.inject.spi.ProcessInjectionPoint<T,X> pip)Process injection points.
-
-
-
Method Detail
-
gatherApplications
public <T,X> void gatherApplications(@Observes javax.enterprise.inject.spi.ProcessInjectionPoint<T,X> pip)Process injection points.In this method all of the injection points that have the
GrpcProxyare processed and their types are stored so that in theafterBean(AfterBeanDiscovery, BeanManager)we can manually create a producer for the correct service proxy type.- Type Parameters:
X- the declared type of the injection point.T- the bean class of the bean that declares the injection point- Parameters:
pip- the injection point
-
afterBean
public void afterBean(@Observes javax.enterprise.inject.spi.AfterBeanDiscovery event, javax.enterprise.inject.spi.BeanManager beanManager)Process the previously capturedGrpcProxyinjection points.For each
GrpcProxyinjection point we create a producer bean for the required type.- Parameters:
event- theAfterBeanDiscoveryeventbeanManager- the CDI bean manager
-
-