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.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

@Component("kamelet") public class KameletComponent extends org.apache.camel.support.DefaultComponent
Materialize route templates
  • Field Summary

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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
     
    protected void
     
    protected org.apache.camel.component.kamelet.KameletConsumer
    getConsumer(String key, boolean block, long timeout)
     
    org.apache.camel.Processor
     
     
     
    org.apache.camel.spi.RouteTemplateLoaderListener
     
     
    long
     
    boolean
     
    void
    removeConsumer(String key, org.apache.camel.component.kamelet.KameletConsumer consumer)
     
    org.apache.camel.Processor
     
    protected boolean
     
    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
    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
    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, 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, doStart, doStop, 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

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • KameletComponent

      public KameletComponent()
  • Method Details

    • 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 class org.apache.camel.support.DefaultComponent
      Throws:
      Exception
    • resolveRawParameterValues

      protected boolean resolveRawParameterValues()
      Overrides:
      resolveRawParameterValues in class org.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 class org.apache.camel.support.DefaultComponent
      Throws:
      Exception
    • doShutdown

      protected void doShutdown() throws Exception
      Overrides:
      doShutdown in class org.apache.camel.support.service.BaseService
      Throws:
      Exception