Class ConsulRegistry
java.lang.Object
org.apache.camel.component.consul.ConsulRegistry
- All Implemented Interfaces:
org.apache.camel.spi.BeanRepository
,org.apache.camel.spi.Registry
Apache Camel Plug-in for Consul Registry (Objects stored under kv/key as well as bookmarked under kv/[type]/key to
avoid iteration over types)
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
bindAsPrototype
(String id, Class<?> type, Supplier<Object> bean) <T> Set<T>
findByType
(Class<T> type) findByTypeWithName
(Class<T> type) int
getPort()
lookupByName
(String key) <T> T
lookupByNameAndType
(String name, Class<T> type) void
void
void
setHostname
(String hostname) void
setPort
(int port) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.BeanRepository
findSingleByType, unwrap
Methods inherited from interface org.apache.camel.spi.Registry
bind, unbind, wrap
-
Constructor Details
-
ConsulRegistry
-
ConsulRegistry
-
-
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
public void bind(String id, Class<?> type, Object bean) throws org.apache.camel.RuntimeCamelException - Specified by:
bind
in interfaceorg.apache.camel.spi.Registry
- Throws:
org.apache.camel.RuntimeCamelException
-
bind
public void bind(String id, Class<?> type, Supplier<Object> bean) throws org.apache.camel.RuntimeCamelException - Specified by:
bind
in interfaceorg.apache.camel.spi.Registry
- Throws:
org.apache.camel.RuntimeCamelException
-
bindAsPrototype
public void bindAsPrototype(String id, Class<?> type, Supplier<Object> bean) throws org.apache.camel.RuntimeCamelException - Specified by:
bindAsPrototype
in interfaceorg.apache.camel.spi.Registry
- Throws:
org.apache.camel.RuntimeCamelException
-
remove
-
put
-
getHostname
-
setHostname
-
getPort
public int getPort() -
setPort
public void setPort(int port)
-