Package org.apache.camel.support
Class LocalBeanRegistry
- 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
-
- org.apache.camel.support.LocalBeanRegistry
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,Cloneable
,Map<String,Map<Class<?>,Object>>
,org.apache.camel.spi.BeanRepository
,org.apache.camel.spi.Registry
public final class LocalBeanRegistry extends SupplierRegistry
A special registry which is used for local beans. ThisRegistry
is only intended to be used by camel-core.- See Also:
- Serialized Form
-
-
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 Constructor Description LocalBeanRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalBeanRegistry
copy()
Makes a copy of this registrySet<String>
keys()
void
swapKey(String oldKey, String newKey)
Swaps the key which is used when this local registry have a number of bound beans that would clash with global registry or endpoint registry in Camel.-
Methods inherited from class org.apache.camel.support.SupplierRegistry
bind, findByType, findByTypeWithName, lookupByNameAndType
-
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 java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
copy
public LocalBeanRegistry copy()
Makes a copy of this registry
-
swapKey
public void swapKey(String oldKey, String newKey)
Swaps the key which is used when this local registry have a number of bound beans that would clash with global registry or endpoint registry in Camel. Then there is a check that validates for clashes and then re-assign key names.- Parameters:
oldKey
- the old key namenewKey
- the new key name
-
-