use of org.apache.cxf.jaxrs.ext.JAXRSServerFactoryCustomizationExtension in project cxf by apache.
the class JAXRSCdiResourceExtension method customize.
/**
* Look and apply the available JAXRSServerFactoryBean extensions to customize its
* creation (f.e. add features, providers, assign transport, ...)
* @param beanManager bean manager
* @param bean JAX-RS server factory bean about to be created
*/
private void customize(final BeanManager beanManager, final JAXRSServerFactoryBean bean) {
JAXRSServerFactoryCustomizationUtils.customize(bean);
final Collection<Bean<?>> extensionBeans = beanManager.getBeans(JAXRSServerFactoryCustomizationExtension.class);
for (final Bean<?> extensionBean : extensionBeans) {
final JAXRSServerFactoryCustomizationExtension extension = (JAXRSServerFactoryCustomizationExtension) beanManager.getReference(extensionBean, JAXRSServerFactoryCustomizationExtension.class, createCreationalContext(beanManager, extensionBean));
extension.customize(bean);
}
}
Aggregations