Class GrpcClientCdiExtension

All Implemented Interfaces:

public class GrpcClientCdiExtension extends Object implements Extension
A CDI extension to add gRPC client functionality.
  • Constructor Details

    • GrpcClientCdiExtension

      public GrpcClientCdiExtension()
  • Method Details

    • gatherApplications

      public <T, X> void gatherApplications(@Observes ProcessInjectionPoint<T,X> pip)
      Process injection points.

      In this method all of the injection points that have the GrpcProxy are processed and their types are stored so that in the afterBean(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
      pip - the injection point
    • afterBean

      public void afterBean(@Observes AfterBeanDiscovery event, BeanManager beanManager)
      Process the previously captured GrpcProxy injection points.

      For each GrpcProxy injection point we create a producer bean for the required type.

      event - the AfterBeanDiscovery event
      beanManager - the CDI bean manager