public class SupplierRegistry extends SimpleRegistry
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.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SupplierRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(String id,
Class<?> type,
Supplier<Object> bean) |
<T> Set<T> |
findByType(Class<T> type) |
<T> Map<String,T> |
findByTypeWithName(Class<T> type) |
<T> T |
lookupByNameAndType(String name,
Class<T> type) |
bind, bindAsPrototype, close, lookupByNameclear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizepublic <T> T lookupByNameAndType(String name, Class<T> type)
lookupByNameAndType in interface org.apache.camel.spi.BeanRepositorylookupByNameAndType in class SimpleRegistrypublic <T> Set<T> findByType(Class<T> type)
findByType in interface org.apache.camel.spi.BeanRepositoryfindByType in class SimpleRegistrypublic <T> Map<String,T> findByTypeWithName(Class<T> type)
findByTypeWithName in interface org.apache.camel.spi.BeanRepositoryfindByTypeWithName in class SimpleRegistryApache Camel