public class RestClientExtension extends Object implements jakarta.enterprise.inject.spi.Extension
RegisterRestClient
and creates new Producer from each of these selected interfaces.
Also adds support for injection of rest client instances to fields
without RestClient
annotation.Constructor and Description |
---|
RestClientExtension() |
Modifier and Type | Method and Description |
---|---|
void |
collectClientRegistrations(jakarta.enterprise.inject.spi.ProcessAnnotatedType<?> processAnnotatedType)
Filters out all interfaces annotated with
RegisterRestClient annotation and
adds them to the collection for further processing. |
void |
restClientRegistration(jakarta.enterprise.inject.spi.AfterBeanDiscovery abd,
jakarta.enterprise.inject.spi.BeanManager bm)
Creates new producers based on collected interfaces.
|
public void collectClientRegistrations(@Observes jakarta.enterprise.inject.spi.ProcessAnnotatedType<?> processAnnotatedType)
RegisterRestClient
annotation and
adds them to the collection for further processing.processAnnotatedType
- filtered annotated typespublic void restClientRegistration(@Observes jakarta.enterprise.inject.spi.AfterBeanDiscovery abd, jakarta.enterprise.inject.spi.BeanManager bm)
abd
- after bean discovery instancebm
- bean manager instanceCopyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.