Interface CamelDependencyInjectionAnnotationFactory
public interface CamelDependencyInjectionAnnotationFactory
Factory that creates the task carrying out a Camel dependency-injection annotation, such as binding a
BindToRegistry bean into the Registry.
During CamelBeanPostProcessor bean post-processing, when a BindToRegistry annotation
is found this factory produces a Runnable that performs the actual binding, including any optional init and
destroy methods. Decoupling the binding into a task lets runtimes (such as Spring or Quarkus) control exactly when
and how beans are registered, rather than binding eagerly during the scan.
See Bean Integration in the Camel user manual.- Since:
- 3.16
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateBindToRegistryFactory(String id, Object bean, Class<?> beanType, String beanName, boolean beanPostProcess, String initMethod, String destroyMethod) The task for binding the bean to the registry (egannotation
-
Method Details
-
createBindToRegistryFactory
Runnable createBindToRegistryFactory(String id, Object bean, Class<?> beanType, String beanName, boolean beanPostProcess, String initMethod, String destroyMethod) The task for binding the bean to the registry (egannotation- Parameters:
id- the bean idbean- the bean instancebeanType- the bean type (optional)beanName- the bean namebeanPostProcess- whether bean post processor should be performedinitMethod- optional init method (invoked at bind)destroyMethod- optional destroy method (invoked at unbind or stopping Camel)- Returns:
- the created task to use for binding the bean
-