Package org.apache.camel
Interface CamelContext
- All Superinterfaces:
AutoCloseable
,CamelContextLifecycle
,RuntimeConfiguration
- All Known Subinterfaces:
CatalogCamelContext
Interface used to represent the CamelContext used to configure routes and the policies to use during message
exchanges between endpoints.
The CamelContext offers the following methods
CamelContextLifecycle
to control the lifecycle:
CamelContextLifecycle.start()
- to startCamelContextLifecycle.stop()
- to shutdown (will stop all routes/components/endpoints etc and clear internal state/cache)CamelContextLifecycle.suspend()
- to pause routing messagesCamelContextLifecycle.resume()
- to resume after a suspend
CamelContextLifecycle.stop()
and CamelContextLifecycle.suspend()
will gracefully stop/suspend routes ensuring any messages in
progress will be given time to complete. See more details at ShutdownStrategy
.
If you are doing a hot restart then it's advised to use the suspend/resume methods which ensure a faster restart but
also allows any internal state to be kept as is. The stop/start approach will do a cold restart of Camel,
where all internal state is reset.
End users are advised to use suspend/resume. Using stop is for shutting down Camel and it's not guaranteed that when
it's being started again using the start method that Camel will operate consistently.
You can use the getCamelContextExtension()
to obtain the extension point for the
CamelContext
. This extension point exposes internal APIs via ExtendedCamelContext
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(String componentName, Component component) Adds a component to the context.addEndpoint
(String uri, Endpoint endpoint) Adds and starts the endpoint to theEndpointRegistry
using the given URI.void
addLifecycleStrategy
(LifecycleStrategy lifecycleStrategy) Adds the given lifecycle strategy to be used.void
addPrototypeService
(Object object) Adds a service to this CamelContext (prototype scope).addRouteFromTemplate
(String routeId, String routeTemplateId, String prefixId, Map<String, Object> parameters) Adds a new route from a given route template.addRouteFromTemplate
(String routeId, String routeTemplateId, String prefixId, RouteTemplateContext routeTemplateContext) Adds a new route from a given route template.Adds a new route from a given route template.void
addRoutePolicyFactory
(RoutePolicyFactory routePolicyFactory) Adds the given route policy factoryvoid
addRoutes
(RoutesBuilder builder) Adds a collection of routes to this CamelContext using the given builder to build them.void
Adds the routes configurations (global configuration for all routes) from the routes builder.void
addService
(Object object) Adds a service to this CamelContext, which allows this CamelContext to control the lifecycle, ensuring the service is stopped when the CamelContext stops.void
addService
(Object object, boolean stopOnShutdown) Adds a service to this CamelContext.void
addService
(Object object, boolean stopOnShutdown, boolean forceStart) Adds a service to this CamelContext.void
addStartupListener
(StartupListener listener) Adds the given listener to be invoked whenCamelContext
have just been started.void
addTemplatedRoutes
(RoutesBuilder builder) Adds the templated routes from the routes builder.Creates a newConsumerTemplate
which is started and therefore ready to use right away.createConsumerTemplate
(int maximumCacheSize) Creates a newConsumerTemplate
which is started and therefore ready to use right away.createDataFormat
(String name) Creates a new instance of the given data format given its name.Creates a newFluentProducerTemplate
which is started and therefore ready to use right away.createFluentProducerTemplate
(int maximumCacheSize) Creates a newFluentProducerTemplate
which is started and therefore ready to use right away.Creates a newProducerTemplate
which is started and therefore ready to use right away.createProducerTemplate
(int maximumCacheSize) Creates a newProducerTemplate
which is started and therefore ready to use right away.void
deferStartService
(Object object, boolean stopOnShutdown) Defers starting the service untilCamelContext
is (almost started) or started and has initialized all its prior services and routes.void
Disables using JMX asManagementStrategy
.Gets the application CamelContext class loader which may be helpful for running camel in other containersGets theExtendedCamelContext
that contains the extension points for internal context APIs.Returns the class resolver to be used for loading/lookup of classes.getClock()
Gets a clock instance that keeps track of time for relevant CamelContext eventsgetComponent
(String componentName) Gets a component from the CamelContext by name.getComponent
(String name, boolean autoCreateComponents) Gets a component from the CamelContext by name.getComponent
(String name, boolean autoCreateComponents, boolean autoStart) Gets a component from the CamelContext by name.<T extends Component>
TgetComponent
(String name, Class<T> componentType) Gets a component from the CamelContext by name and specifying the expected type of component.Gets a readonly list of names of the components currently registeredGets a readonly list of names of the data formats currently registeredGets the currentDebugger
Gets the description of this CamelContext.If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML DSL into the log.getEndpoint
(String uri) Resolves the given name to anEndpoint
of the specified type.<T extends Endpoint>
TgetEndpoint
(String name, Class<T> endpointType) Resolves the given name to anEndpoint
of the specified type.getEndpoint
(String uri, Map<String, Object> parameters) Resolves the given name to anEndpoint
of the specified type.Gets theEndpointRegistry
Returns a read-onlyCollection
of all of the endpoints from theEndpointRegistry
Gets the currentExecutorServiceManager
Gets the global endpoint configuration, where you can configure common endpoint options.getGlobalOption
(String key) Gets the global option value that can be referenced in the camel contextGets global options that can be referenced in the camel context.Gets the inflight repositoryReturns the injector used to instantiate objects by typeGets a readonly list with the names of the languages currently registered.Returns the lifecycle strategies used to handle lifecycle notificationsGets the name thisCamelContext
was registered in JMX.Gets the current management name strategyGets the management strategyGets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message.Gets the currentMessageHistoryFactory
getName()
Gets the name (id) of this CamelContext.Gets the current name strategygetProcessor
(String id) Gets the processor from any of the routes which with the given id<T extends Processor>
TgetProcessor
(String id, Class<T> type) Gets the processor from any of the routes which with the given idReturns the configured properties component or create one if none has been configured.Returns the registry used to lookup components by name and type such as SimpleRegistry, Spring ApplicationContext, JNDI, or the OSGi Service Registry.<T> T
getRegistry
(Class<T> type) Returns the registry used to lookup components by name and as the given typeGets the default REST configurationGets theRestRegistry
to useGets the route with the given idGets theRouteController
Gets the route policy factoriesReturns the current routes in this CamelContextint
Returns the total number of routes in this CamelContextGets theRuntimeEndpointRegistry
to use, or null if none is in use.Gets the current shutdown strategy.Gets the global SSL context parameters if configured.Controls the level of information logged during startup (and shutdown) ofCamelContext
.Gets theStreamCachingStrategy
to use.Gets the currentTracer
To use a custom tracing logging format.Gets theTransformerRegistry
Returns the type converter used to coerce types from one type to another.Returns the type converter registry where type converters can be added or looked upGets the uptime for this context.Gets the currentUuidGenerator
Gets theValidatorRegistry
getVariable
(String name) To get a variable by name.<T> T
getVariable
(String name, Class<T> type) To get a variable by name and covert to the given type.Gets the vault configurationGets the version of the this CamelContext.hasComponent
(String componentName) Is the given component already registered?hasEndpoint
(String uri) Is the given endpoint already registered in theEndpointRegistry
<T> T
hasService
(Class<T> type) Has the given service type already been added to this CamelContext?boolean
hasService
(Object object) Has the given service already been added to this CamelContext?hasService
(Predicate<Service> filter) Finds the first service matching the filter<T> Set
<T> hasServices
(Class<T> type) Has the given service type already been added to this CamelContext?boolean
Whether to set backlog tracing on standby.boolean
Whether backlog tracing should trace inner details from route templates (or kamelets).boolean
Whether to set backlog debugger on standby.Whether to enable developer console (requires camel-console on classpath).Whether to load custom health checks by scanning classpath.Whether to load custom type converters by scanning classpath.Whether camel-k style modeline is also enabled when not using camel-k.Whether to capture precise source location:line-number for all EIPs in Camel routes.boolean
Whether to set tracing on standby.boolean
Whether tracing should trace inner details from route templates (or kamelets).Whether or not type converter statistics is enabled.Whether or not breadcrumb is enabled.Whether to enable using data type on Camel messages.Whether or not MDC logging is being enabled.boolean
If CamelContext during the start procedure was vetoed, and therefore causing Camel to not start.removeComponent
(String componentName) Removes a previously added component.void
removeEndpoint
(Endpoint endpoint) Removes the endpoint from theEndpointRegistry
.removeEndpoints
(String pattern) Removes all endpoints with the given URI from theEndpointRegistry
.boolean
removeRoute
(String routeId) Removes the given route (the route must be stopped before it can be removed).void
removeRouteTemplates
(String pattern) Removes the route templates matching the patternboolean
removeService
(Object object) Removes a service from this CamelContext.resolveDataFormat
(String name) Resolve an existing data format, or creates a new by the given its nameresolveLanguage
(String language) Resolves a language for creating expressionsParses the given text and resolve any property placeholders - using {{key}}.resolveTransformer
(String name) Resolve a transformer given a schemeresolveTransformer
(DataType from, DataType to) Resolve a transformer given from/to data type.resolveValidator
(DataType type) Resolve a validator given from/to data type.void
setApplicationContextClassLoader
(ClassLoader classLoader) Sets the application CamelContext class loadervoid
setBacklogTracingStandby
(boolean backlogTracingStandby) Whether to set backlog tracing on standby.void
setBacklogTracingTemplates
(boolean backlogTracingTemplates) Whether backlog tracing should trace inner details from route templates (or kamelets).void
setClassResolver
(ClassResolver resolver) Sets the class resolver to be usevoid
setDebugger
(Debugger debugger) Sets a customDebugger
void
setDebugStandby
(boolean debugStandby) Whether to set backlog debugger on standby.void
setDevConsole
(Boolean loadDevConsoles) Whether to enable developer console (requires camel-console on classpath) The developer console is only for assisting during development.void
setDumpRoutes
(String format) If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log.void
setExecutorServiceManager
(ExecutorServiceManager executorServiceManager) Sets a customExecutorServiceManager
void
setGlobalOptions
(Map<String, String> globalOptions) Sets global options that can be referenced in the camel contextvoid
setInflightRepository
(InflightRepository repository) Sets a custom inflight repository to usevoid
setInjector
(Injector injector) Sets the injector to usevoid
setLoadHealthChecks
(Boolean loadHealthChecks) Whether to load custom health checks by scanning classpath.void
setLoadTypeConverters
(Boolean loadTypeConverters) Whether to load custom type converters by scanning classpath.void
setManagementName
(String name) Sets the name thisCamelContext
will be registered in JMX.void
setManagementNameStrategy
(ManagementNameStrategy nameStrategy) Sets a custom management name strategyvoid
setManagementStrategy
(ManagementStrategy strategy) Sets the management strategy to usevoid
setMDCLoggingKeysPattern
(String pattern) Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message.void
setMessageHistoryFactory
(MessageHistoryFactory messageHistoryFactory) Sets a customMessageHistoryFactory
void
setModeline
(Boolean modeline) Whether camel-k style modeline is also enabled when not using camel-k.void
setNameStrategy
(CamelContextNameStrategy nameStrategy) Sets a custom name strategyvoid
setPropertiesComponent
(PropertiesComponent propertiesComponent) Sets a custom properties component to be used.void
setRestConfiguration
(RestConfiguration restConfiguration) Sets a customRestConfiguration
void
setRestRegistry
(RestRegistry restRegistry) Sets a customRestRegistry
to use.void
setRouteController
(RouteController routeController) Sets a customRouteController
to usevoid
setRuntimeEndpointRegistry
(RuntimeEndpointRegistry runtimeEndpointRegistry) Sets a customRuntimeEndpointRegistry
to use.void
setShutdownStrategy
(ShutdownStrategy shutdownStrategy) Sets a custom shutdown strategyvoid
setSourceLocationEnabled
(Boolean sourceLocationEnabled) Whether to capture precise source location:line-number for all EIPs in Camel routes.void
setSSLContextParameters
(SSLContextParameters sslContextParameters) Sets the global SSL context parameters.void
setStartupSummaryLevel
(StartupSummaryLevel startupSummaryLevel) Controls the level of information logged during startup (and shutdown) ofCamelContext
.void
setStreamCachingStrategy
(StreamCachingStrategy streamCachingStrategy) Sets a customStreamCachingStrategy
to use.void
Sets a customTracer
void
setTracingLoggingFormat
(String format) To use a custom tracing logging format.void
setTracingStandby
(boolean tracingStandby) Whether to set tracing on standby.void
setTracingTemplates
(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets).void
setTypeConverterRegistry
(TypeConverterRegistry typeConverterRegistry) Configures the type converter registry to use, where type converters can be added or looked up.void
setTypeConverterStatisticsEnabled
(Boolean typeConverterStatisticsEnabled) Sets whether or not type converter statistics is enabled.void
setUseBreadcrumb
(Boolean useBreadcrumb) Set whether breadcrumb is enabled.void
setUseDataType
(Boolean useDataType) Whether to enable using data type on Camel messages.void
setUseMDCLogging
(Boolean useMDCLogging) Set whether MDC is enabled.void
setUuidGenerator
(UuidGenerator uuidGenerator) Sets a customUuidGenerator
(should only be set once)void
setVariable
(String name, Object value) Sets a variablevoid
setVaultConfiguration
(VaultConfiguration vaultConfiguration) Sets a customVaultConfiguration
Methods inherited from interface org.apache.camel.CamelContextLifecycle
build, close, getStatus, init, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
Methods inherited from interface org.apache.camel.RuntimeConfiguration
getDelayer, getShutdownRoute, getShutdownRunningTask, getTracingPattern, isAllowUseOriginalMessage, isAutoStartup, isAutowiredEnabled, isBacklogTracing, isCaseInsensitiveHeaders, isDebugging, isLogExhaustedMessageBody, isLogMask, isMessageHistory, isStreamCaching, isTracing, setAllowUseOriginalMessage, setAutoStartup, setAutowiredEnabled, setBacklogTracing, setCaseInsensitiveHeaders, setDebugging, setDelayer, setLogExhaustedMessageBody, setLogMask, setMessageHistory, setShutdownRoute, setShutdownRunningTask, setStreamCaching, setTracing, setTracingPattern
-
Method Details
-
getCamelContextExtension
ExtendedCamelContext getCamelContextExtension()Gets theExtendedCamelContext
that contains the extension points for internal context APIs. These APIs are intended for internal usage within Camel and end-users should avoid using them.- Returns:
- this
ExtendedCamelContext
extension point for this context.
-
isVetoStarted
boolean isVetoStarted()If CamelContext during the start procedure was vetoed, and therefore causing Camel to not start. -
getName
String getName()Gets the name (id) of this CamelContext.- Returns:
- the name
-
getDescription
String getDescription()Gets the description of this CamelContext.- Returns:
- the description, or null if no description has been set.
-
getNameStrategy
CamelContextNameStrategy getNameStrategy()Gets the current name strategy- Returns:
- name strategy
-
setNameStrategy
Sets a custom name strategy- Parameters:
nameStrategy
- name strategy
-
getManagementNameStrategy
ManagementNameStrategy getManagementNameStrategy()Gets the current management name strategy- Returns:
- management name strategy
-
setManagementNameStrategy
Sets a custom management name strategy- Parameters:
nameStrategy
- name strategy
-
getManagementName
String getManagementName()Gets the name thisCamelContext
was registered in JMX. The reason that aCamelContext
can have a different name in JMX is the fact to remedy for name clash in JMX when having multipleCamelContext
s in the same JVM. Camel will automatic reassign and use a free name to avoid failing to start.- Returns:
- the management name
-
setManagementName
Sets the name thisCamelContext
will be registered in JMX. -
getVersion
String getVersion()Gets the version of the this CamelContext.- Returns:
- the version
-
getUptime
Duration getUptime()Gets the uptime for this context.- Returns:
- the uptime
-
getClock
EventClock<ContextEvents> getClock()Gets a clock instance that keeps track of time for relevant CamelContext events- Returns:
- A clock instance
-
addService
Adds a service to this CamelContext, which allows this CamelContext to control the lifecycle, ensuring the service is stopped when the CamelContext stops. The service will also haveCamelContext
injected if itsCamelContextAware
. The service will also be enlisted in JMX for management (if JMX is enabled). The service will be started, if its not already started.- Parameters:
object
- the service- Throws:
Exception
- can be thrown when starting the service
-
addService
Adds a service to this CamelContext. The service will also haveCamelContext
injected if itsCamelContextAware
. The service will also be enlisted in JMX for management (if JMX is enabled). The service will be started, if its not already started. If the option closeOnShutdown is true then this CamelContext will control the lifecycle, ensuring the service is stopped when the CamelContext stops. If the option closeOnShutdown is false then this CamelContext will not stop the service when the CamelContext stops.- Parameters:
object
- the servicestopOnShutdown
- whether to stop the service when this CamelContext shutdown.- Throws:
Exception
- can be thrown when starting the service
-
addService
Adds a service to this CamelContext. The service will also haveCamelContext
injected if itsCamelContextAware
. The service will also be enlisted in JMX for management (if JMX is enabled). The service will be started, if its not already started. If the option closeOnShutdown is true then this CamelContext will control the lifecycle, ensuring the service is stopped when the CamelContext stops. If the option closeOnShutdown is false then this CamelContext will not stop the service when the CamelContext stops.- Parameters:
object
- the servicestopOnShutdown
- whether to stop the service when this CamelContext shutdown.forceStart
- whether to force starting the service right now, as otherwise the service may be deferred being started to later usingdeferStartService(Object, boolean)
- Throws:
Exception
- can be thrown when starting the service
-
addPrototypeService
Adds a service to this CamelContext (prototype scope). The service will also haveCamelContext
injected if itsCamelContextAware
. The service will be started, if its not already started.- Parameters:
object
- the service- Throws:
Exception
- can be thrown when starting the service
-
removeService
Removes a service from this CamelContext. The service is assumed to have been previously added usingaddService(Object)
method. This method will not change the service lifecycle.- Parameters:
object
- the service- Returns:
- true if the service was removed, false if no service existed
- Throws:
Exception
- can be thrown if error removing the service
-
hasService
Has the given service already been added to this CamelContext?- Parameters:
object
- the service- Returns:
- true if already added, false if not.
-
hasService
Finds the first service matching the filter- Parameters:
filter
- the filter- Returns:
- the service if found or null if none found
-
hasService
Has the given service type already been added to this CamelContext?- Parameters:
type
- the class type- Returns:
- the service instance or null if not already added.
-
hasServices
Has the given service type already been added to this CamelContext?- Parameters:
type
- the class type- Returns:
- the services instance or empty set.
-
deferStartService
Defers starting the service untilCamelContext
is (almost started) or started and has initialized all its prior services and routes. IfCamelContext
is already started then the service is started immediately.- Parameters:
object
- the servicestopOnShutdown
- whether to stop the service when this CamelContext shutdown. Setting this to true will keep a reference to the service in thisCamelContext
until the CamelContext is stopped. So do not use it for short lived services.- Throws:
Exception
- can be thrown when starting the service, which is only attempted ifCamelContext
has already been started when calling this method.
-
addStartupListener
Adds the given listener to be invoked whenCamelContext
have just been started. This allows listeners to do any custom work after the routes and other services have been started and are running. Important: The listener will always be invoked, also if theCamelContext
has already been started, see theStartupListener.onCamelContextStarted(CamelContext, boolean)
method.- Parameters:
listener
- the listener- Throws:
Exception
- can be thrown ifCamelContext
is already started and the listener is invoked and cause an exception to be thrown
-
addComponent
Adds a component to the context. Notice the component will be auto-started if Camel is already started.- Parameters:
componentName
- the name the component is registered ascomponent
- the component
-
hasComponent
Is the given component already registered?- Parameters:
componentName
- the name of the component- Returns:
- the registered Component or null if not registered
-
getComponent
Gets a component from the CamelContext by name. Notice the returned component will be auto-started. If you do not intend to do that then usegetComponent(String, boolean, boolean)
.- Parameters:
componentName
- the name of the component- Returns:
- the component
-
getComponent
Gets a component from the CamelContext by name. Notice the returned component will be auto-started. If you do not intend to do that then usegetComponent(String, boolean, boolean)
.- Parameters:
name
- the name of the componentautoCreateComponents
- whether or not the component should be lazily created if it does not already exist- Returns:
- the component
-
getComponent
Gets a component from the CamelContext by name.- Parameters:
name
- the name of the componentautoCreateComponents
- whether or not the component should be lazily created if it does not already existautoStart
- whether to auto start the component ifCamelContext
is already started.- Returns:
- the component
-
getComponent
Gets a component from the CamelContext by name and specifying the expected type of component.- Parameters:
name
- the name to lookupcomponentType
- the expected type- Returns:
- the component
-
getComponentNames
Gets a readonly list of names of the components currently registered- Returns:
- a readonly list with the names of the components
-
removeComponent
Removes a previously added component. The component being removed will be stopped first.- Parameters:
componentName
- the component name to remove- Returns:
- the previously added component or null if it had not been previously added.
-
getEndpointRegistry
EndpointRegistry getEndpointRegistry()Gets theEndpointRegistry
-
getEndpoint
Resolves the given name to anEndpoint
of the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpoint
is created and registered in theEndpointRegistry
.- Parameters:
uri
- the URI of the endpoint- Returns:
- the endpoint
-
getEndpoint
Resolves the given name to anEndpoint
of the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpoint
is created and registered in theEndpointRegistry
.- Parameters:
uri
- the URI of the endpointparameters
- the parameters to customize the endpoint- Returns:
- the endpoint
-
getEndpoint
Resolves the given name to anEndpoint
of the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a newEndpoint
is created and registered in theEndpointRegistry
.- Parameters:
name
- the name of the endpointendpointType
- the expected type- Returns:
- the endpoint
-
getEndpoints
Collection<Endpoint> getEndpoints()Returns a read-onlyCollection
of all of the endpoints from theEndpointRegistry
- Returns:
- all endpoints
-
hasEndpoint
Is the given endpoint already registered in theEndpointRegistry
- Parameters:
uri
- the URI of the endpoint- Returns:
- the registered endpoint or null if not registered
-
addEndpoint
Adds and starts the endpoint to theEndpointRegistry
using the given URI.- Parameters:
uri
- the URI to be used to resolve this endpointendpoint
- the endpoint to be started and added to the registry- Returns:
- the old endpoint that was previously registered or null if none was registered
- Throws:
Exception
- if the new endpoint could not be started or the old endpoint could not be stopped
-
removeEndpoint
Removes the endpoint from theEndpointRegistry
. The endpoint being removed will be stopped first.- Parameters:
endpoint
- the endpoint- Throws:
Exception
- if the endpoint could not be stopped
-
removeEndpoints
Removes all endpoints with the given URI from theEndpointRegistry
. The endpoints being removed will be stopped first.- Parameters:
pattern
- an uri or pattern to match- Returns:
- a collection of endpoints removed which could be empty if there are no endpoints found for the given pattern
- Throws:
Exception
- if at least one endpoint could not be stopped- See Also:
-
getGlobalEndpointConfiguration
GlobalEndpointConfiguration getGlobalEndpointConfiguration()Gets the global endpoint configuration, where you can configure common endpoint options. -
setRouteController
Sets a customRouteController
to use- Parameters:
routeController
- the route controller
-
getRouteController
RouteController getRouteController()Gets theRouteController
- Returns:
- the route controller.
-
getRoutes
Returns the current routes in this CamelContext- Returns:
- the current routes
-
getRoutesSize
int getRoutesSize()Returns the total number of routes in this CamelContext -
getRoute
Gets the route with the given id- Parameters:
id
- id of the route- Returns:
- the route or null if not found
-
getProcessor
Gets the processor from any of the routes which with the given id- Parameters:
id
- id of the processor- Returns:
- the processor or null if not found
-
getProcessor
Gets the processor from any of the routes which with the given id- Parameters:
id
- id of the processortype
- the processor type- Returns:
- the processor or null if not found
- Throws:
ClassCastException
- is thrown if the type is not correct type
-
addRoutes
Adds a collection of routes to this CamelContext using the given builder to build them. Important: The added routes will only be started, ifCamelContext
is already started. You may want to check the state ofCamelContext
before adding the routes, using theCamelContextLifecycle.getStatus()
method. Important: Each route in the sameCamelContext
must have an unique route id. If you use the API fromCamelContext
orinvalid reference
org.apache.camel.model.ModelCamelContext
- Parameters:
builder
- the builder which will create the routes and add them to this CamelContext- Throws:
Exception
- if the routes could not be created for whatever reason
-
addTemplatedRoutes
Adds the templated routes from the routes builder. For example in Java DSL you can useinvalid reference
org.apache.camel.builder.TemplatedRouteBuilder
- Parameters:
builder
- the builder which has templated routes- Throws:
Exception
- if the routes could not be created for whatever reason
-
addRoutesConfigurations
Adds the routes configurations (global configuration for all routes) from the routes builder.- Parameters:
builder
- the builder which has routes configurations- Throws:
Exception
- if the routes configurations could not be created for whatever reason
-
removeRoute
Removes the given route (the route must be stopped before it can be removed). A route which is removed will be unregistered from JMX, have its services stopped/shutdown and the route definition etc. will also be removed. All the resources related to the route will be stopped and cleared. Important: When removing a route, theEndpoint
s which are in the static cache ofEndpointRegistry
and are only used by the route (not used by other routes) will also be removed. ButEndpoint
s which may have been created as part of routing messages by the route, and those endpoints are enlisted in the dynamic cache ofEndpointRegistry
are not removed. To remove those dynamic kind of endpoints, use theremoveEndpoints(String)
method. If not removing those endpoints, they will be kept in the dynamic cache ofEndpointRegistry
, but my eventually be removed (evicted) when they have not been in use for a longer period of time; and the dynamic cache upper limit is hit, and it evicts the least used endpoints. End users can use this method to remove unwanted routes or temporary routes which no longer is in demand.- Parameters:
routeId
- the route id- Returns:
- true if the route was removed, false if the route could not be removed because it's not stopped
- Throws:
Exception
- is thrown if the route could not be shutdown for whatever reason
-
addRouteFromTemplate
String addRouteFromTemplate(String routeId, String routeTemplateId, Map<String, Object> parameters) throws ExceptionAdds a new route from a given route template. Camel end users should favour usinginvalid reference
org.apache.camel.builder.TemplatedRouteBuilder
- Parameters:
routeId
- the id of the new route to add (optional)routeTemplateId
- the id of the route template (mandatory)parameters
- parameters to use for the route template when creating the new route- Returns:
- the id of the route added (for example when an id was auto assigned)
- Throws:
Exception
- is thrown if error creating and adding the new route
-
addRouteFromTemplate
String addRouteFromTemplate(String routeId, String routeTemplateId, String prefixId, Map<String, Object> parameters) throws ExceptionAdds a new route from a given route template. Camel end users should favour usinginvalid reference
org.apache.camel.builder.TemplatedRouteBuilder
- Parameters:
routeId
- the id of the new route to add (optional)routeTemplateId
- the id of the route template (mandatory)prefixId
- prefix to use for all node ids (not route id). Use null for no prefix. (optional)parameters
- parameters to use for the route template when creating the new route- Returns:
- the id of the route added (for example when an id was auto assigned)
- Throws:
Exception
- is thrown if error creating and adding the new route
-
addRouteFromTemplate
String addRouteFromTemplate(String routeId, String routeTemplateId, String prefixId, RouteTemplateContext routeTemplateContext) throws Exception Adds a new route from a given route template. Camel end users should favour usinginvalid reference
org.apache.camel.builder.TemplatedRouteBuilder
- Parameters:
routeId
- the id of the new route to add (optional)routeTemplateId
- the id of the route template (mandatory)prefixId
- prefix to use for all node ids (not route id). Use null for no prefix. (optional)routeTemplateContext
- the route template context (mandatory)- Returns:
- the id of the route added (for example when an id was auto assigned)
- Throws:
Exception
- is thrown if error creating and adding the new route
-
removeRouteTemplates
Removes the route templates matching the pattern- Parameters:
pattern
- pattern, such as * for all, or foo* to remove all foo templates- Throws:
Exception
- is thrown if error during removing route templates
-
addRoutePolicyFactory
Adds the given route policy factory- Parameters:
routePolicyFactory
- the factory
-
getRoutePolicyFactories
List<RoutePolicyFactory> getRoutePolicyFactories()Gets the route policy factories- Returns:
- the list of current route policy factories
-
setRestConfiguration
Sets a customRestConfiguration
- Parameters:
restConfiguration
- the REST configuration
-
getRestConfiguration
RestConfiguration getRestConfiguration()Gets the default REST configuration- Returns:
- the configuration, or null if none has been configured.
-
setVaultConfiguration
Sets a customVaultConfiguration
- Parameters:
vaultConfiguration
- the vault configuration
-
getVaultConfiguration
VaultConfiguration getVaultConfiguration()Gets the vault configuration- Returns:
- the configuration, or null if none has been configured.
-
getRestRegistry
RestRegistry getRestRegistry()Gets theRestRegistry
to use -
setRestRegistry
Sets a customRestRegistry
to use. -
getTypeConverter
TypeConverter getTypeConverter()Returns the type converter used to coerce types from one type to another. Notice that thisCamelContext
should be at least initialized before you can get the type converter.- Returns:
- the converter
-
getTypeConverterRegistry
TypeConverterRegistry getTypeConverterRegistry()Returns the type converter registry where type converters can be added or looked up- Returns:
- the type converter registry
-
setTypeConverterRegistry
Configures the type converter registry to use, where type converters can be added or looked up.- Parameters:
typeConverterRegistry
- the registry to use
-
getRegistry
Registry getRegistry()Returns the registry used to lookup components by name and type such as SimpleRegistry, Spring ApplicationContext, JNDI, or the OSGi Service Registry.- Returns:
- the registry
-
getRegistry
Returns the registry used to lookup components by name and as the given type- Parameters:
type
- the registry type such as org.apache.camel.impl.JndiRegistry- Returns:
- the registry, or null if the given type was not found as a registry implementation
-
getInjector
Injector getInjector()Returns the injector used to instantiate objects by type- Returns:
- the injector
-
setInjector
Sets the injector to use -
getLifecycleStrategies
List<LifecycleStrategy> getLifecycleStrategies()Returns the lifecycle strategies used to handle lifecycle notifications- Returns:
- the lifecycle strategies
-
addLifecycleStrategy
Adds the given lifecycle strategy to be used.- Parameters:
lifecycleStrategy
- the strategy
-
resolveLanguage
Resolves a language for creating expressions- Parameters:
language
- name of the language- Returns:
- the resolved language
- Throws:
NoSuchLanguageException
- is thrown if language could not be resolved
-
resolvePropertyPlaceholders
Parses the given text and resolve any property placeholders - using {{key}}. Important: If resolving placeholders on an endpoint uri, then you SHOULD use EndpointHelper#resolveEndpointUriPropertyPlaceholders instead.- Parameters:
text
- the text such as an endpoint uri or the likes- Returns:
- the text with resolved property placeholders
- Throws:
IllegalArgumentException
- is thrown if property placeholders was used and there was an error resolving them
-
getVariable
To get a variable by name.- Parameters:
name
- the variable name. Can be prefixed with repo-id:name to lookup the variable from a specific repository. If no repo-id is provided, then global repository will be used.- Returns:
- the variable, or null if not found.
-
getVariable
To get a variable by name and covert to the given type.- Parameters:
name
- the variable name. Can be prefixed with repo-id:name to lookup the variable from a specific repository. If no repo-id is provided, then global repository will be used.type
- the type to convert the variable to- Returns:
- the variable, or null if not found.
-
setVariable
Sets a variable- Parameters:
name
- the variable name. Can be prefixed with repo-id:name to store the variable in a specific repository. If no repo-id is provided, then global repository will be used.value
- the value of the variable
-
getPropertiesComponent
PropertiesComponent getPropertiesComponent()Returns the configured properties component or create one if none has been configured.- Returns:
- the properties component
-
setPropertiesComponent
Sets a custom properties component to be used. -
getLanguageNames
Gets a readonly list with the names of the languages currently registered.- Returns:
- a readonly list with the names of the languages
-
createProducerTemplate
ProducerTemplate createProducerTemplate()Creates a newProducerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources. Will use cache size defined in Camel property with keyExchange.MAXIMUM_CACHE_POOL_SIZE
. If no key was defined then it will fallback to a default size of 1000. You can also use theProducerTemplate.setMaximumCacheSize(int)
method to use a custom value before starting the template.- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
createProducerTemplate
Creates a newProducerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources.- Parameters:
maximumCacheSize
- the maximum cache size- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
createFluentProducerTemplate
FluentProducerTemplate createFluentProducerTemplate()Creates a newFluentProducerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources. Will use cache size defined in Camel property with keyExchange.MAXIMUM_CACHE_POOL_SIZE
. If no key was defined then it will fallback to a default size of 1000. You can also use theFluentProducerTemplate.setMaximumCacheSize(int)
method to use a custom value before starting the template.- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
createFluentProducerTemplate
Creates a newFluentProducerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources.- Parameters:
maximumCacheSize
- the maximum cache size- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
createConsumerTemplate
ConsumerTemplate createConsumerTemplate()Creates a newConsumerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? as it also applies for ConsumerTemplate. Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources. Will use cache size defined in Camel property with keyExchange.MAXIMUM_CACHE_POOL_SIZE
. If no key was defined then it will fallback to a default size of 1000. You can also use theConsumerTemplate.setMaximumCacheSize(int)
method to use a custom value before starting the template.- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
createConsumerTemplate
Creates a newConsumerTemplate
which is started and therefore ready to use right away. See this FAQ before use: Why does Camel use too many threads with ProducerTemplate? as it also applies for ConsumerTemplate. Important: Make sure to callService.stop()
when you are done using the template, to clean up any resources.- Parameters:
maximumCacheSize
- the maximum cache size- Returns:
- the template
- Throws:
RuntimeCamelException
- is thrown if error starting the template
-
resolveDataFormat
Resolve an existing data format, or creates a new by the given its name- Parameters:
name
- the data format name or a reference to it in theRegistry
- Returns:
- the resolved data format, or null if not found
-
createDataFormat
Creates a new instance of the given data format given its name.- Parameters:
name
- the data format name or a reference to a data format factory in theRegistry
- Returns:
- the created data format, or null if not found
-
getDataFormatNames
Gets a readonly list of names of the data formats currently registered- Returns:
- a readonly list with the names of the data formats
-
resolveTransformer
Resolve a transformer given a scheme- Parameters:
name
- the transformer name, usually a combination of some scheme and name.- Returns:
- the resolved transformer, or null if not found
-
resolveTransformer
Resolve a transformer given from/to data type.- Parameters:
from
- from data typeto
- to data type- Returns:
- the resolved transformer, or null if not found
-
getTransformerRegistry
TransformerRegistry getTransformerRegistry()Gets theTransformerRegistry
- Returns:
- the TransformerRegistry
-
resolveValidator
Resolve a validator given from/to data type.- Parameters:
type
- the data type- Returns:
- the resolved validator, or null if not found
-
getValidatorRegistry
ValidatorRegistry getValidatorRegistry()Gets theValidatorRegistry
- Returns:
- the ValidatorRegistry
-
setGlobalOptions
Sets global options that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. For property placeholders useresolvePropertyPlaceholders(String)
method and see more details at the property placeholder documentation.- Parameters:
globalOptions
- global options that can be referenced in the camel context
-
getGlobalOptions
Gets global options that can be referenced in the camel context. Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. For property placeholders useresolvePropertyPlaceholders(String)
method and see more details at the property placeholder documentation.- Returns:
- global options for this context
-
getGlobalOption
Gets the global option value that can be referenced in the camel context Important: This has nothing to do with property placeholders, and is just a plain set of key/value pairs which are used to configure global options on CamelContext, such as a maximum debug logging length etc. For property placeholders useresolvePropertyPlaceholders(String)
method and see more details at the property placeholder documentation.- Returns:
- the string value of the global option
-
getClassResolver
ClassResolver getClassResolver()Returns the class resolver to be used for loading/lookup of classes.- Returns:
- the resolver
-
setClassResolver
Sets the class resolver to be use- Parameters:
resolver
- the resolver
-
getManagementStrategy
ManagementStrategy getManagementStrategy()Gets the management strategy- Returns:
- the management strategy
-
setManagementStrategy
Sets the management strategy to use- Parameters:
strategy
- the management strategy
-
disableJMX
Disables using JMX asManagementStrategy
. Important: This method must be called before theCamelContext
is started.- Throws:
IllegalStateException
- is thrown if theCamelContext
is not in stopped state.
-
getInflightRepository
InflightRepository getInflightRepository()Gets the inflight repository- Returns:
- the repository
-
setInflightRepository
Sets a custom inflight repository to use- Parameters:
repository
- the repository
-
getApplicationContextClassLoader
ClassLoader getApplicationContextClassLoader()Gets the application CamelContext class loader which may be helpful for running camel in other containers- Returns:
- the application CamelContext class loader
-
setApplicationContextClassLoader
Sets the application CamelContext class loader- Parameters:
classLoader
- the class loader
-
getShutdownStrategy
ShutdownStrategy getShutdownStrategy()Gets the current shutdown strategy. The shutdown strategy is not intended for Camel end users to use for stopping routes. Instead useRouteController
viaCamelContext
.- Returns:
- the strategy
-
setShutdownStrategy
Sets a custom shutdown strategy- Parameters:
shutdownStrategy
- the custom strategy
-
getExecutorServiceManager
ExecutorServiceManager getExecutorServiceManager()Gets the currentExecutorServiceManager
- Returns:
- the manager
-
setExecutorServiceManager
Sets a customExecutorServiceManager
- Parameters:
executorServiceManager
- the custom manager
-
getMessageHistoryFactory
MessageHistoryFactory getMessageHistoryFactory()Gets the currentMessageHistoryFactory
- Returns:
- the factory
-
setMessageHistoryFactory
Sets a customMessageHistoryFactory
- Parameters:
messageHistoryFactory
- the custom factory
-
getDebugger
Debugger getDebugger()Gets the currentDebugger
- Returns:
- the debugger
-
setDebugger
Sets a customDebugger
- Parameters:
debugger
- the debugger
-
getTracer
Tracer getTracer()Gets the currentTracer
- Returns:
- the tracer
-
setTracer
Sets a customTracer
-
setTracingStandby
void setTracingStandby(boolean tracingStandby) Whether to set tracing on standby. If on standby then the tracer is installed and made available. Then the tracer can be enabled later at runtime via JMX or viaTracer.setEnabled(boolean)
. -
isTracingStandby
boolean isTracingStandby()Whether to set tracing on standby. If on standby then the tracer is installed and made available. Then the tracer can be enabled later at runtime via JMX or viaTracer.setEnabled(boolean)
. -
setBacklogTracingStandby
void setBacklogTracingStandby(boolean backlogTracingStandby) Whether to set backlog tracing on standby. If on standby then the backlog tracer is installed and made available. Then the backlog tracer can be enabled later at runtime via JMX or via Java API. -
isBacklogTracingStandby
boolean isBacklogTracingStandby()Whether to set backlog tracing on standby. If on standby then the backlog tracer is installed and made available. Then the backlog tracer can be enabled later at runtime via JMX or via Java API. -
setDebugStandby
void setDebugStandby(boolean debugStandby) Whether to set backlog debugger on standby. If on standby then the backlog debugger is installed and made available. Then the backlog debugger can be enabled later at runtime via JMX or via Java API. -
isDebugStandby
boolean isDebugStandby()Whether to set backlog debugger on standby. If on standby then the backlog debugger is installed and made available. Then the backlog debugger can be enabled later at runtime via JMX or via Java API. -
setBacklogTracingTemplates
void setBacklogTracingTemplates(boolean backlogTracingTemplates) Whether backlog tracing should trace inner details from route templates (or kamelets). Turning this off can reduce the verbosity of tracing when using many route templates, and allow to focus on tracing your own Camel routes only. -
isBacklogTracingTemplates
boolean isBacklogTracingTemplates()Whether backlog tracing should trace inner details from route templates (or kamelets). Turning this on increases the verbosity of tracing by including events from internal routes in the templates or kamelets. -
getUuidGenerator
UuidGenerator getUuidGenerator()Gets the currentUuidGenerator
- Returns:
- the uuidGenerator
-
setUuidGenerator
Sets a customUuidGenerator
(should only be set once)- Parameters:
uuidGenerator
- the UUID Generator
-
isLoadTypeConverters
Boolean isLoadTypeConverters()Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting @Converter(loader = true) on your custom type converter classes. -
setLoadTypeConverters
Whether to load custom type converters by scanning classpath. This is used for backwards compatibility with Camel 2.x. Its recommended to migrate to use fast type converter loading by setting @Converter(loader = true) on your custom type converter classes.- Parameters:
loadTypeConverters
- whether to load custom type converters using classpath scanning.
-
isLoadHealthChecks
Boolean isLoadHealthChecks()Whether to load custom health checks by scanning classpath. -
setLoadHealthChecks
Whether to load custom health checks by scanning classpath. -
isSourceLocationEnabled
Boolean isSourceLocationEnabled()Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this usesStackTraceElement
to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. -
setSourceLocationEnabled
Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this usesStackTraceElement
to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. -
isModeline
Boolean isModeline()Whether camel-k style modeline is also enabled when not using camel-k. Enabling this allows to use a camel-k like experience by being able to configure various settings using modeline directly in your route source code. -
setModeline
Whether camel-k style modeline is also enabled when not using camel-k. Enabling this allows to use a camel-k like experience by being able to configure various settings using modeline directly in your route source code. -
isDevConsole
Boolean isDevConsole()Whether to enable developer console (requires camel-console on classpath). The developer console is only for assisting during development. This is NOT for production usage. -
setDevConsole
Whether to enable developer console (requires camel-console on classpath) The developer console is only for assisting during development. This is NOT for production usage. -
isTypeConverterStatisticsEnabled
Boolean isTypeConverterStatisticsEnabled()Whether or not type converter statistics is enabled. By default the type converter utilization statistics is disabled. Notice: If enabled then there is a slight performance impact under very heavy load.- Returns:
- true if enabled, false if disabled (default).
-
setTypeConverterStatisticsEnabled
Sets whether or not type converter statistics is enabled. By default the type converter utilization statistics is disabled. Notice: If enabled then there is a slight performance impact under very heavy load. You can enable/disable the statistics at runtime using theinvalid @link
{@link org.apache.camel.spi.TypeConverterRegistry#getStatistics()#setTypeConverterStatisticsEnabled(Boolean)
invalid reference
org.apache.camel.api.management.mbean.ManagedTypeConverterRegistryMBean
- Parameters:
typeConverterStatisticsEnabled
- true to enable, false to disable
-
isUseMDCLogging
Boolean isUseMDCLogging()Whether or not MDC logging is being enabled.- Returns:
- true if MDC logging is enabled
-
setUseMDCLogging
Set whether MDC is enabled.- Parameters:
useMDCLogging
- true to enable MDC logging, false to disable
-
getMDCLoggingKeysPattern
String getMDCLoggingKeysPattern()Gets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to * will propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with either foo or bar. Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. The match rules are applied in this order (case insensitive):- exact match, returns true
- wildcard match (pattern ends with a * and the name starts with the pattern), returns true
- regular expression match, returns true
- otherwise returns false
-
setMDCLoggingKeysPattern
Sets the pattern used for determine which custom MDC keys to propagate during message routing when the routing engine continues routing asynchronously for the given message. Setting this pattern to * will propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with either foo or bar. Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. The match rules are applied in this order (case insensitive):- exact match, returns true
- wildcard match (pattern ends with a * and the name starts with the pattern), returns true
- regular expression match, returns true
- otherwise returns false
- Parameters:
pattern
- the pattern
-
getTracingLoggingFormat
String getTracingLoggingFormat()To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s] -
setTracingLoggingFormat
To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s [%-12.12s] [%-33.33s]- Parameters:
format
- the logging format
-
setTracingTemplates
void setTracingTemplates(boolean tracingTemplates) Whether tracing should trace inner details from route templates (or kamelets). Turning this on increases the verbosity of tracing by including events from internal routes in the templates or kamelets. -
isTracingTemplates
boolean isTracingTemplates()Whether tracing should trace inner details from route templates (or kamelets). Turning this off can reduce the verbosity of tracing when using many route templates, and allow to focus on tracing your own Camel routes only. -
getDumpRoutes
String getDumpRoutes()If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended to be used for production usage. This requires to have camel-xml-jaxb on the classpath to be able to dump the routes as XML.- Returns:
- xml, or yaml if dumping is enabled
-
setDumpRoutes
If dumping is enabled then Camel will during startup dump all loaded routes (incl rests and route templates) represented as XML/YAML DSL into the log. This is intended for trouble shooting or to assist during development. Sensitive information that may be configured in the route endpoints could potentially be included in the dump output and is therefore not recommended being used for production usage. This requires to have camel-xml-io/camel-yaml-io on the classpath to be able to dump the routes as XML/YAML.- Parameters:
format
- xml or yaml (additional configuration can be specified using query parameters, eg ?include=allinvalid input: '&uriAsParameters'=true)
-
isUseDataType
Boolean isUseDataType()Whether to enable using data type on Camel messages. Data type are automatic turned on if one or more routes has been explicit configured with input and output types. Otherwise, data type is default off.- Returns:
- true if data type is enabled
-
setUseDataType
Whether to enable using data type on Camel messages. Data type are automatic turned on if one or more routes has been explicit configured with input and output types. Otherwise, data type is default off.- Parameters:
useDataType
- true to enable data type on Camel messages.
-
isUseBreadcrumb
Boolean isUseBreadcrumb()Whether or not breadcrumb is enabled.- Returns:
- true if breadcrumb is enabled
-
setUseBreadcrumb
Set whether breadcrumb is enabled.- Parameters:
useBreadcrumb
- true to enable breadcrumb, false to disable
-
getStreamCachingStrategy
StreamCachingStrategy getStreamCachingStrategy()Gets theStreamCachingStrategy
to use. -
setStreamCachingStrategy
Sets a customStreamCachingStrategy
to use. -
getRuntimeEndpointRegistry
RuntimeEndpointRegistry getRuntimeEndpointRegistry()Gets theRuntimeEndpointRegistry
to use, or null if none is in use. -
setRuntimeEndpointRegistry
Sets a customRuntimeEndpointRegistry
to use. -
setSSLContextParameters
Sets the global SSL context parameters. -
getSSLContextParameters
SSLContextParameters getSSLContextParameters()Gets the global SSL context parameters if configured. -
setStartupSummaryLevel
Controls the level of information logged during startup (and shutdown) ofCamelContext
. -
getStartupSummaryLevel
StartupSummaryLevel getStartupSummaryLevel()Controls the level of information logged during startup (and shutdown) ofCamelContext
.
-