Class RestClientExtension
- java.lang.Object
-
- org.glassfish.jersey.microprofile.restclient.RestClientExtension
-
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.Extension
public class RestClientExtension extends Object implements jakarta.enterprise.inject.spi.Extension
Filters out all interfaces annotated withRegisterRestClientand creates new Producer from each of these selected interfaces. Also adds support for injection of rest client instances to fields withoutRestClientannotation.- Author:
- David Kral
-
-
Constructor Summary
Constructors Constructor Description RestClientExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcollectClientRegistrations(jakarta.enterprise.inject.spi.ProcessAnnotatedType<?> processAnnotatedType)Filters out all interfaces annotated withRegisterRestClientannotation and adds them to the collection for further processing.voidrestClientRegistration(jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, jakarta.enterprise.inject.spi.BeanManager bm)Creates new producers based on collected interfaces.
-
-
-
Method Detail
-
collectClientRegistrations
public void collectClientRegistrations(@Observes jakarta.enterprise.inject.spi.ProcessAnnotatedType<?> processAnnotatedType)Filters out all interfaces annotated withRegisterRestClientannotation and adds them to the collection for further processing.- Parameters:
processAnnotatedType- filtered annotated types
-
restClientRegistration
public void restClientRegistration(@Observes jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, jakarta.enterprise.inject.spi.BeanManager bm)Creates new producers based on collected interfaces.- Parameters:
abd- after bean discovery instancebm- bean manager instance
-
-