public class SimpleRegistry extends LinkedHashMap<String,Map<Class<?>,Object>> implements org.apache.camel.spi.Registry, Closeable
Map
-based registry.
Favour using DefaultRegistry
instead of this.DefaultRegistry
,
Serialized FormAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
SimpleRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
bind(String id,
Class<?> type,
Supplier<Object> bean) |
void |
bind(String id,
Class type,
Object bean) |
void |
bindAsPrototype(String id,
Class<?> type,
Supplier<Object> bean) |
void |
close() |
<T> Set<T> |
findByType(Class<T> type) |
<T> Map<String,T> |
findByTypeWithName(Class<T> type) |
Object |
lookupByName(String name) |
<T> T |
lookupByNameAndType(String name,
Class<T> type) |
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
public Object lookupByName(String name)
lookupByName
in interface org.apache.camel.spi.BeanRepository
public <T> T lookupByNameAndType(String name, Class<T> type)
lookupByNameAndType
in interface org.apache.camel.spi.BeanRepository
public <T> Map<String,T> findByTypeWithName(Class<T> type)
findByTypeWithName
in interface org.apache.camel.spi.BeanRepository
public <T> Set<T> findByType(Class<T> type)
findByType
in interface org.apache.camel.spi.BeanRepository
public void bind(String id, Class type, Object bean)
bind
in interface org.apache.camel.spi.Registry
public void bind(String id, Class<?> type, Supplier<Object> bean)
bind
in interface org.apache.camel.spi.Registry
public void bindAsPrototype(String id, Class<?> type, Supplier<Object> bean)
bindAsPrototype
in interface org.apache.camel.spi.Registry
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Apache Camel