public class CdiComponentProvider extends Object implements ComponentProvider, jakarta.enterprise.inject.spi.Extension
Jersey component provider to serve CDI beans
 obtained from the actual CDI bean manager.
 To properly inject JAX-RS/Jersey managed beans into CDI, it also
 serves as a CDI Extension, that intercepts CDI injection targets.| Modifier and Type | Class and Description | 
|---|---|
| static class  | CdiComponentProvider.CdiDefaultAnnotationAuxiliary annotation for mocked beans used to cover Jersey/HK2 injected injection points. | 
| static class  | CdiComponentProvider.JaxRsParamProducerCDI producer for CDI bean constructor String parameters, that should be injected by JAX-RS. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | CDI_CLASS_ANALYZERName to be used when binding CDI injectee skipping class analyzer to HK2 service injection manager. | 
| Constructor and Description | 
|---|
| CdiComponentProvider() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addHK2DepenendencyCheck(Predicate<Class<?>> predicate)Add a predicate to test HK2 dependency to create a CDI bridge bean to HK2 for it. | 
| boolean | bind(Class<?> component,
    ContractProvider contractProvider)Jersey will invoke this method before binding of each component class internally
 during initialization of it's injection manager. | 
| boolean | bind(Class<?> clazz,
    Set<Class<?>> providerContracts)Jersey will invoke this method before binding of each component class internally
 during initialization of it's injection manager. | 
| void | done()Jersey will invoke this method after all component classes have been bound. | 
| void | initialize(org.glassfish.jersey.internal.inject.InjectionManager injectionManager)Initializes the component provider with a reference to a injection manager
 instance, which will get used in the application to manage individual components. | 
| void | processAnnotatedType(jakarta.enterprise.inject.spi.ProcessAnnotatedType processAnnotatedType) | 
public static final String CDI_CLASS_ANALYZER
public void initialize(org.glassfish.jersey.internal.inject.InjectionManager injectionManager)
ComponentProviderinitialize in interface ComponentProviderinjectionManager - an injection manager.public boolean bind(Class<?> clazz, Set<Class<?>> providerContracts)
ComponentProviderbind in interface ComponentProviderclazz - a component (resource/provider) class.providerContracts - provider contracts implemented by given component.public boolean bind(Class<?> component, ContractProvider contractProvider)
ComponentProviderbind in interface ComponentProvidercomponent - a component (resource/provider) class.contractProvider - optional registered ContractProvider of the component.public void done()
ComponentProviderdone in interface ComponentProviderpublic void processAnnotatedType(jakarta.enterprise.inject.spi.ProcessAnnotatedType processAnnotatedType)
Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.