Package org.apache.camel.support
Class SimpleRegistry
- 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:
SupplierRegistry
public class SimpleRegistry
extends LinkedHashMap<String,Map<Class<?>,Object>>
implements org.apache.camel.spi.Registry, Closeable
A
Map
-based registry.
Favour using DefaultRegistry
instead of this.- 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
void
void
bindAsPrototype
(String id, Class<?> type, Supplier<Object> bean) void
close()
<T> Set<T>
findByType
(Class<T> type) findByTypeWithName
(Class<T> type) lookupByName
(String name) <T> T
lookupByNameAndType
(String name, Class<T> type) void
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
-
SimpleRegistry
public SimpleRegistry()
-
-
Method Details
-
lookupByName
- Specified by:
lookupByName
in interfaceorg.apache.camel.spi.BeanRepository
-
lookupByNameAndType
- Specified by:
lookupByNameAndType
in interfaceorg.apache.camel.spi.BeanRepository
-
findByTypeWithName
- Specified by:
findByTypeWithName
in interfaceorg.apache.camel.spi.BeanRepository
-
findByType
- Specified by:
findByType
in interfaceorg.apache.camel.spi.BeanRepository
-
bind
- Specified by:
bind
in interfaceorg.apache.camel.spi.Registry
-
bind
- Specified by:
bind
in interfaceorg.apache.camel.spi.Registry
-
bindAsPrototype
- Specified by:
bindAsPrototype
in interfaceorg.apache.camel.spi.Registry
-
unbind
- Specified by:
unbind
in interfaceorg.apache.camel.spi.Registry
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-