Package org.apache.camel.spi
Interface Registry
-
- All Superinterfaces:
BeanRepository
public interface Registry extends BeanRepository
Represents aBeanRepository
which may also be capable of binding beans to its repository.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
bind(String id, Class<?> type, Object bean)
Binds the bean to the repository (if possible).default void
bind(String id, Object bean)
Binds the bean to the repository (if possible).default Object
wrap(Object value)
Strategy to wrap the value to be stored in the registry.-
Methods inherited from interface org.apache.camel.spi.BeanRepository
findByType, findByTypeWithName, lookupByName, lookupByNameAndType, unwrap
-
-
-
-
Method Detail
-
bind
default void bind(String id, Object bean) throws RuntimeCamelException
Binds the bean to the repository (if possible). If the bean isCamelContextAware
then the registry will automatic inject the context if possible.- Parameters:
id
- the id of the beanbean
- the bean- Throws:
RuntimeCamelException
- is thrown if binding is not possible
-
bind
void bind(String id, Class<?> type, Object bean) throws RuntimeCamelException
Binds the bean to the repository (if possible). Binding by id and type allows to bind multiple entries with the same id but with different type. If the bean isCamelContextAware
then the registry will automatic inject the context if possible.- Parameters:
id
- the id of the beantype
- the type of the bean to associate the bindingbean
- the bean- Throws:
RuntimeCamelException
- is thrown if binding is not possible
-
-