Class KameletComponent
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultComponent
-
- org.apache.camel.component.kamelet.KameletComponent
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.Component
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@Component("kamelet") public class KameletComponent extends org.apache.camel.support.DefaultComponent
The Kamelet Component provides support for materializing routes templates.
-
-
Constructor Summary
Constructors Constructor Description KameletComponent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConsumer(String key, org.apache.camel.component.kamelet.KameletConsumer consumer)
void
addKameletEip(String key, org.apache.camel.Processor callback)
protected org.apache.camel.Endpoint
createEndpoint(String uri, String remaining, Map<String,Object> parameters)
protected void
doInit()
protected void
doShutdown()
protected org.apache.camel.component.kamelet.KameletConsumer
getConsumer(String key, boolean block, long timeout)
org.apache.camel.Processor
getKameletEip(String key)
String
getLocation()
Map<String,Properties>
getRouteProperties()
org.apache.camel.spi.RouteTemplateLoaderListener
getRouteTemplateLoaderListener()
Map<String,Properties>
getTemplateProperties()
long
getTimeout()
boolean
isBlock()
void
removeConsumer(String key, org.apache.camel.component.kamelet.KameletConsumer consumer)
org.apache.camel.Processor
removeKameletEip(String key)
protected boolean
resolveRawParameterValues()
void
setBlock(boolean block)
If sending a message to a kamelet endpoint which has no active consumer, then we can tell the producer to block and wait for the consumer to become active.void
setLocation(String location)
The location(s) of the Kamelets on the file system.void
setRouteProperties(Map<String,Properties> routeProperties)
Set route local parameters.void
setRouteTemplateLoaderListener(org.apache.camel.spi.RouteTemplateLoaderListener routeTemplateLoaderListener)
To plugin a custom listener for when the Kamelet component is loading Kamelets from external resources.void
setTemplateProperties(Map<String,Properties> templateProperties)
Set template local parameters.void
setTimeout(long timeout)
The timeout value to use if block is enabled.-
Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
addKameletEip
public void addKameletEip(String key, org.apache.camel.Processor callback)
-
removeKameletEip
public org.apache.camel.Processor removeKameletEip(String key)
-
getKameletEip
public org.apache.camel.Processor getKameletEip(String key)
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
- Specified by:
createEndpoint
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
resolveRawParameterValues
protected boolean resolveRawParameterValues()
- Overrides:
resolveRawParameterValues
in classorg.apache.camel.support.DefaultComponent
-
isBlock
public boolean isBlock()
-
setBlock
public void setBlock(boolean block)
If sending a message to a kamelet endpoint which has no active consumer, then we can tell the producer to block and wait for the consumer to become active.
-
getTimeout
public long getTimeout()
-
setTimeout
public void setTimeout(long timeout)
The timeout value to use if block is enabled.
-
getTemplateProperties
public Map<String,Properties> getTemplateProperties()
-
setTemplateProperties
public void setTemplateProperties(Map<String,Properties> templateProperties)
Set template local parameters.
-
getRouteProperties
public Map<String,Properties> getRouteProperties()
-
setRouteProperties
public void setRouteProperties(Map<String,Properties> routeProperties)
Set route local parameters.
-
getLocation
public String getLocation()
-
setLocation
public void setLocation(String location)
The location(s) of the Kamelets on the file system. Multiple locations can be set separated by comma.
-
getRouteTemplateLoaderListener
public org.apache.camel.spi.RouteTemplateLoaderListener getRouteTemplateLoaderListener()
-
setRouteTemplateLoaderListener
public void setRouteTemplateLoaderListener(org.apache.camel.spi.RouteTemplateLoaderListener routeTemplateLoaderListener)
To plugin a custom listener for when the Kamelet component is loading Kamelets from external resources.
-
addConsumer
public void addConsumer(String key, org.apache.camel.component.kamelet.KameletConsumer consumer)
-
removeConsumer
public void removeConsumer(String key, org.apache.camel.component.kamelet.KameletConsumer consumer)
-
getConsumer
protected org.apache.camel.component.kamelet.KameletConsumer getConsumer(String key, boolean block, long timeout) throws InterruptedException
- Throws:
InterruptedException
-
doInit
protected void doInit() throws Exception
- Overrides:
doInit
in classorg.apache.camel.support.DefaultComponent
- Throws:
Exception
-
-