Class DynamicRouterEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.dynamicrouter.DynamicRouterEndpoint
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="3.15.0", scheme="dynamic-router", title="Dynamic Router", syntax="dynamic-router:channel", alternativeSyntax="dynamic-router:channel/controlAction/subscribeChannel", producerOnly=true, category={ENDPOINT,JAVA}) public class DynamicRouterEndpoint extends org.apache.camel.support.DefaultEndpointThe Dynamic Router component routes exchanges to recipients, and the recipients (and their rules) may change at runtime.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicRouterEndpoint.DynamicRouterEndpointFactoryCreate aDynamicRouterEndpointinstance.
-
Constructor Summary
Constructors Constructor Description DynamicRouterEndpoint(String uri, DynamicRouterComponent component, DynamicRouterConfiguration configuration, Supplier<DynamicRouterControlChannelProcessor.DynamicRouterControlChannelProcessorFactory> processorFactorySupplier, Supplier<DynamicRouterControlProducer.DynamicRouterControlProducerFactory> controlProducerFactorySupplier)Create the specialized endpoint for the Dynamic Router Control Channel.DynamicRouterEndpoint(String uri, DynamicRouterComponent component, DynamicRouterConfiguration configuration, Supplier<DynamicRouterProcessor.DynamicRouterProcessorFactory> processorFactorySupplier, Supplier<DynamicRouterProducer.DynamicRouterProducerFactory> producerFactorySupplier, Supplier<PrioritizedFilterProcessor.PrioritizedFilterProcessorFactory> filterProcessorFactorySupplier)Create the Dynamic RouterEndpointfor the given endpoint URI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)This is a producer-only component.org.apache.camel.ProducercreateProducer()Calls theDynamicRouterProducer.DynamicRouterProducerFactoryto create aDynamicRouterProducerinstance.protected voiddoInit()DynamicRouterConfigurationgetConfiguration()Gets theDynamicRouterConfiguration.DynamicRouterComponentgetDynamicRouterComponent()A convenience method that wraps the parent method and casts to theDynamicRouterComponentimplementation.voidsetConfiguration(DynamicRouterConfiguration configuration)Set theDynamicRouterConfiguration.-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, 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, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
DynamicRouterEndpoint
public DynamicRouterEndpoint(String uri, DynamicRouterComponent component, DynamicRouterConfiguration configuration, Supplier<DynamicRouterProcessor.DynamicRouterProcessorFactory> processorFactorySupplier, Supplier<DynamicRouterProducer.DynamicRouterProducerFactory> producerFactorySupplier, Supplier<PrioritizedFilterProcessor.PrioritizedFilterProcessorFactory> filterProcessorFactorySupplier)
Create the Dynamic RouterEndpointfor the given endpoint URI. This includes the creation of aDynamicRouterProcessorthat is registered with the suppliedDynamicRouterComponent.- Parameters:
uri- the endpoint URIcomponent- the Dynamic RouterComponentconfiguration- theDynamicRouterConfigurationprocessorFactorySupplier- creates theDynamicRouterProcessorproducerFactorySupplier- creates theDynamicRouterProcessorfilterProcessorFactorySupplier- creates thePrioritizedFilterProcessor
-
DynamicRouterEndpoint
public DynamicRouterEndpoint(String uri, DynamicRouterComponent component, DynamicRouterConfiguration configuration, Supplier<DynamicRouterControlChannelProcessor.DynamicRouterControlChannelProcessorFactory> processorFactorySupplier, Supplier<DynamicRouterControlProducer.DynamicRouterControlProducerFactory> controlProducerFactorySupplier)
Create the specialized endpoint for the Dynamic Router Control Channel.- Parameters:
uri- the endpoint URIcomponent- the Dynamic RouterComponentconfiguration- theDynamicRouterConfigurationprocessorFactorySupplier- creates theDynamicRouterControlChannelProcessorcontrolProducerFactorySupplier- creates theDynamicRouterProcessor
-
-
Method Detail
-
doInit
protected void doInit() throws Exception- Overrides:
doInitin classorg.apache.camel.support.DefaultEndpoint- Throws:
Exception
-
createProducer
public org.apache.camel.Producer createProducer()
Calls theDynamicRouterProducer.DynamicRouterProducerFactoryto create aDynamicRouterProducerinstance.- Returns:
- a
DynamicRouterProducerinstance
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
This is a producer-only component.- Parameters:
processor- not applicable to producer-only component- Returns:
- not applicable to producer-only component
-
getDynamicRouterComponent
public DynamicRouterComponent getDynamicRouterComponent()
A convenience method that wraps the parent method and casts to theDynamicRouterComponentimplementation.- Returns:
- the
DynamicRouterComponent
-
getConfiguration
public DynamicRouterConfiguration getConfiguration()
Gets theDynamicRouterConfiguration.- Returns:
- the
DynamicRouterConfiguration
-
setConfiguration
public void setConfiguration(DynamicRouterConfiguration configuration)
Set theDynamicRouterConfiguration.- Parameters:
configuration- theDynamicRouterConfiguration
-
-