Package org.apache.camel.support
Class SupplierRegistry
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
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 java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
<T> Set<T>
findByType
(Class<T> type) findByTypeWithName
(Class<T> type) <T> T
lookupByNameAndType
(String name, Class<T> type) Methods inherited from class org.apache.camel.support.SimpleRegistry
bind, bindAsPrototype, close, lookupByName, unbind
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.BeanRepository
findSingleByType, unwrap
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface org.apache.camel.spi.Registry
bind, wrap
-
Constructor Details
-
SupplierRegistry
public SupplierRegistry()
-
-
Method Details
-
lookupByNameAndType
- Specified by:
lookupByNameAndType
in interfaceorg.apache.camel.spi.BeanRepository
- Overrides:
lookupByNameAndType
in classSimpleRegistry
-
findByType
- Specified by:
findByType
in interfaceorg.apache.camel.spi.BeanRepository
- Overrides:
findByType
in classSimpleRegistry
-
findByTypeWithName
- Specified by:
findByTypeWithName
in interfaceorg.apache.camel.spi.BeanRepository
- Overrides:
findByTypeWithName
in classSimpleRegistry
-
bind
- Specified by:
bind
in interfaceorg.apache.camel.spi.Registry
- Overrides:
bind
in classSimpleRegistry
-