Class SupplierRegistry
java.lang.Object
java.util.AbstractMap<String, Map<Class<?>,Object>>
java.util.HashMap<String, Map<Class<?>,Object>>
java.util.LinkedHashMap<String, Map<Class<?>,Object>>
org.apache.camel.support.SimpleRegistry
org.apache.camel.support.SupplierRegistry
- All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, Cloneable, Map<String, Map<Class<?>,Object>>, org.apache.camel.spi.BeanRepository, org.apache.camel.spi.Registry
- Direct Known Subclasses:
LocalBeanRegistry
Used for storing beans that are supplied via a
Supplier.
Camel will cache the result from the supplier from first lookup (singleton scope). If you do not need cached then use
SimpleRegistry.bindAsPrototype(String, Class, Supplier) instead.
To bind a bean as a supplier, then use the Registry.bind(String, Class, Supplier)
method.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<T> Set<T> findByType(Class<T> type) findByTypeWithName(Class<T> type) <T> TlookupByNameAndType(String name, Class<T> type) Methods inherited from class SimpleRegistry
bind, bind, bind, bindAsPrototype, close, lookupByName, unbindMethods inherited from class LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesMethods inherited from class HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class AbstractMap
equals, hashCode, toStringMethods inherited from interface org.apache.camel.spi.BeanRepository
findSingleByType, mandatoryFindSingleByType, unwrapMethods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface org.apache.camel.spi.Registry
bind, bind, wrap
-
Constructor Details
-
SupplierRegistry
public SupplierRegistry()
-
-
Method Details
-
lookupByNameAndType
- Specified by:
lookupByNameAndTypein interfaceorg.apache.camel.spi.BeanRepository- Overrides:
lookupByNameAndTypein classSimpleRegistry
-
findByType
- Specified by:
findByTypein interfaceorg.apache.camel.spi.BeanRepository- Overrides:
findByTypein classSimpleRegistry
-
findByTypeWithName
- Specified by:
findByTypeWithNamein interfaceorg.apache.camel.spi.BeanRepository- Overrides:
findByTypeWithNamein classSimpleRegistry
-
bind
-