Class DynamicRouterControlEndpoint
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.control.DynamicRouterControlEndpoint
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.ComponentAware
,org.apache.camel.Endpoint
,org.apache.camel.IsSingleton
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.HasId
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="4.4.0",
scheme="dynamic-router-control",
title="Dynamic Router Control",
syntax="dynamic-router-control:controlAction",
producerOnly=true,
remote=false,
headersClass=DynamicRouterControlConstants.class,
category=MESSAGING)
public class DynamicRouterControlEndpoint
extends org.apache.camel.support.DefaultEndpoint
The Dynamic Router control endpoint for operations that allow routing participants to subscribe or unsubscribe to
participate in dynamic message routing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Factory to create theDynamicRouterControlEndpoint
. -
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
ConstructorsConstructorDescriptionDynamicRouterControlEndpoint
(String uri, DynamicRouterControlComponent component, String controlAction, DynamicRouterControlConfiguration configuration) Creates the instance.DynamicRouterControlEndpoint
(String uri, DynamicRouterControlComponent component, String controlAction, DynamicRouterControlConfiguration configuration, Supplier<DynamicRouterControlProducer.DynamicRouterControlProducerFactory> controlProducerFactorySupplier, Supplier<DynamicRouterControlService.DynamicRouterControlServiceFactory> controlServiceFactorySupplier) Creates the instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) This is a producer-only component.org.apache.camel.Producer
Creates theDynamicRouterControlProducer
.protected void
doStart()
Starts the component, and creates theDynamicRouterControlService
and adds it to theCamelContext
.protected void
doStop()
Stops the component, and removes theDynamicRouterControlService
from theCamelContext
.Gets theDynamicRouterControlConfiguration
.Gets the control action for this endpoint.boolean
isRemote()
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, 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, getInternalLock, 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
Methods inherited from interface org.apache.camel.ComponentAware
getComponent
Methods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducer
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
-
DynamicRouterControlEndpoint
public DynamicRouterControlEndpoint(String uri, DynamicRouterControlComponent component, String controlAction, DynamicRouterControlConfiguration configuration, Supplier<DynamicRouterControlProducer.DynamicRouterControlProducerFactory> controlProducerFactorySupplier, Supplier<DynamicRouterControlService.DynamicRouterControlServiceFactory> controlServiceFactorySupplier) Creates the instance.- Parameters:
uri
- the URI that was used to cause the endpoint creationcomponent
- the routing component to handle management of subscriber information from routing participantscontrolAction
- the control action of the endpointconfiguration
- the component/endpoint configurationcontrolProducerFactorySupplier
- theDynamicRouterControlProducer.DynamicRouterControlProducerFactory
suppliercontrolServiceFactorySupplier
- theDynamicRouterControlService.DynamicRouterControlServiceFactory
supplier
-
DynamicRouterControlEndpoint
public DynamicRouterControlEndpoint(String uri, DynamicRouterControlComponent component, String controlAction, DynamicRouterControlConfiguration configuration) Creates the instance.- Parameters:
uri
- the URI that was used to cause the endpoint creationcomponent
- the routing component to handle management of subscriber information from routing participantscontrolAction
- the control action of the endpointconfiguration
- the component/endpoint configuration
-
-
Method Details
-
isRemote
public boolean isRemote() -
doStart
Starts the component, and creates theDynamicRouterControlService
and adds it to theCamelContext
.- Overrides:
doStart
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
doStop
Stops the component, and removes theDynamicRouterControlService
from theCamelContext
.- Overrides:
doStop
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-
getComponent
- Specified by:
getComponent
in interfaceorg.apache.camel.ComponentAware
- Overrides:
getComponent
in classorg.apache.camel.support.DefaultEndpoint
-
createProducer
public org.apache.camel.Producer createProducer()Creates theDynamicRouterControlProducer
.- Returns:
- the
DynamicRouterControlProducer
- See Also:
-
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
-
getControlAction
Gets the control action for this endpoint. It will be either "subscribe" or "unsubscribe"- Returns:
- the control action -- either "subscribe" or "unsubscribe"
-
getConfiguration
Gets theDynamicRouterControlConfiguration
.- Returns:
- the
DynamicRouterControlConfiguration
-