Package io.debezium.bean
Class DefaultBeanRegistry
java.lang.Object
io.debezium.bean.DefaultBeanRegistry
- All Implemented Interfaces:
BeanRegistry,Service
The default
BeanRegistry that supports looking up beans.- Author:
- Chris Cranford
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a bean to the registry.voidAdds a bean to the registry, resolving the class type from thebeaninstance.<T> Set<T>findByType(Class<T> type) Finds all beans that are registered by the specified type.findByTypeWithName(Class<T> type) Finds all beans that are registered with the specified type.private <T> ObjectfindMapValueByType(Map<Class<?>, Object> map, Class<T> type) private <T> ObjectgetMapValueWithFallbackTypeLookup(Map<Class<?>, Object> map, Class<T> type) <T> TlookupByName(String name, Class<T> type) Lookup a specific bean by its name and type.voidRemove a bean from the registry by name.
-
Field Details
-
registry
-
-
Constructor Details
-
DefaultBeanRegistry
public DefaultBeanRegistry()
-
-
Method Details
-
findByType
Description copied from interface:BeanRegistryFinds all beans that are registered by the specified type.- Specified by:
findByTypein interfaceBeanRegistry- Parameters:
type- the class type to lookup- Returns:
- set of all beans found, may be empty, never
null
-
findByTypeWithName
Description copied from interface:BeanRegistryFinds all beans that are registered with the specified type.- Specified by:
findByTypeWithNamein interfaceBeanRegistry- Parameters:
type- the class type to lookup- Returns:
- map of bean instances with their mapping register names, may be empty, never
null
-
lookupByName
Description copied from interface:BeanRegistryLookup a specific bean by its name and type.- Specified by:
lookupByNamein interfaceBeanRegistry- Parameters:
name- the bean name to findtype- the bean type to find- Returns:
- the bean or
nullif the bean could not be found
-
add
Description copied from interface:BeanRegistryAdds a bean to the registry.- Specified by:
addin interfaceBeanRegistry- Parameters:
name- the bean name the instance should be registered with, should not benulltype- the bean class type, should not benullbean- the bean instance, should not benull
-
add
Description copied from interface:BeanRegistryAdds a bean to the registry, resolving the class type from thebeaninstance.- Specified by:
addin interfaceBeanRegistry- Parameters:
name- the bean name the instance should be registered with, should not benullbean- the bean instance, should not benull
-
remove
Description copied from interface:BeanRegistryRemove a bean from the registry by name.- Specified by:
removein interfaceBeanRegistry- Parameters:
name- the bean name
-
findMapValueByType
-
getMapValueWithFallbackTypeLookup
-