Package org.apache.camel
Interface RuntimeConfiguration
- All Known Subinterfaces:
CamelContext
,CatalogCamelContext
,Route
public interface RuntimeConfiguration
Various runtime configuration options used by
CamelContext
and Route
for cross
cutting functions such as tracing, delayer, stream cache and the like.-
Method Summary
Modifier and TypeMethodDescriptionGets the delay valueGets the option to use when shutting down the route.Gets the ShutdownRunningTask option in use when shutting down a route.Tracing pattern to match which node EIPs to trace.Gets whether access to the original message from Camel's error handler, or fromUnitOfWork.getOriginalInMessage()
is allowed.Gets whether the object should automatically start when Camel starts.Whether autowiring is enabled.Returns whether backlog tracing is enabled.Whether to use case sensitive or insensitive headers.Returns whether debugging is enabled.Returns whether to log exhausted message body with message history.Gets whether security mask for Logging is enabled or not.Returns whether message history is enabledReturns whether stream cache is enabledReturns whether tracing enabled To use tracing then either turn on tracing standby or enable tracing to make tracing possible.void
setAllowUseOriginalMessage
(Boolean allowUseOriginalMessage) Sets whether to allow access to the original message from Camel's error handler, or fromUnitOfWork.getOriginalInMessage()
.void
setAutoStartup
(Boolean autoStartup) Sets whether the object should automatically start when Camel starts.void
setAutowiredEnabled
(Boolean autowiredEnabled) Whether autowiring is enabled.void
setBacklogTracing
(Boolean backlogTrace) Sets whether backlog tracing is enabled or not (default is disabled).void
setCaseInsensitiveHeaders
(Boolean caseInsensitiveHeaders) Whether to use case sensitive or insensitive headers.void
setDebugging
(Boolean debugging) Sets whether debugging (will use backlog if no custom debugger has been configured) is enabled or not (default is disabled).void
setDelayer
(Long delay) Sets a delay value in millis that a message is delayed at every step it takes in the route path, slowing the process down to better observe what is occurringvoid
setLogExhaustedMessageBody
(Boolean logExhaustedMessageBody) Sets whether to log exhausted message body with message history.void
setLogMask
(Boolean logMask) Sets whether security mask for Logging is enabled or not (default is disabled).void
setMessageHistory
(Boolean messageHistory) Sets whether message history is enabled or not (default is disabled).void
setShutdownRoute
(ShutdownRoute shutdownRoute) Sets the ShutdownRoute option for routes.void
setShutdownRunningTask
(ShutdownRunningTask shutdownRunningTask) Sets the ShutdownRunningTask option to use when shutting down a route.void
setStreamCaching
(Boolean cache) Sets whether stream caching is enabled or not (default is enabled).void
setTracing
(Boolean tracing) Returns whether tracing enabled To use tracing then either turn on tracing standby or enable tracing to make tracing possible.void
setTracingPattern
(String tracePattern) Tracing pattern to match which node EIPs to trace.
-
Method Details
-
setStreamCaching
Sets whether stream caching is enabled or not (default is enabled).- Parameters:
cache
- whether stream caching is enabled or not
-
isStreamCaching
Boolean isStreamCaching()Returns whether stream cache is enabled- Returns:
- true if stream cache is enabled
-
setTracing
Returns whether tracing enabled To use tracing then either turn on tracing standby or enable tracing to make tracing possible.- Parameters:
tracing
- whether to enable tracing.
-
isTracing
Boolean isTracing()Returns whether tracing enabled To use tracing then either turn on tracing standby or enable tracing to make tracing possible.- Returns:
- true if tracing is enabled
-
getTracingPattern
String getTracingPattern()Tracing pattern to match which node EIPs to trace. For example to match all To EIP nodes, use to*. The pattern matches by node and route id's Multiple patterns can be separated by comma. -
setTracingPattern
Tracing pattern to match which node EIPs to trace. For example to match all To EIP nodes, use to*. The pattern matches by node and route id's Multiple patterns can be separated by comma. -
setBacklogTracing
Sets whether backlog tracing is enabled or not (default is disabled). To use backlog tracing then this must be enabled on startup to be installed in the CamelContext.- Parameters:
backlogTrace
- whether to enable backlog tracing.- See Also:
-
isBacklogTracing
Boolean isBacklogTracing()Returns whether backlog tracing is enabled.- Returns:
- true if backlog tracing is enabled
-
setDebugging
Sets whether debugging (will use backlog if no custom debugger has been configured) is enabled or not (default is disabled). To use debugging then this must be enabled on startup to be installed in the CamelContext.- Parameters:
debugging
- whether to enable debugging.
-
isDebugging
Boolean isDebugging()Returns whether debugging is enabled.- Returns:
- true if debugging is enabled
-
setMessageHistory
Sets whether message history is enabled or not (default is disabled).- Parameters:
messageHistory
- whether message history is enabled
-
isMessageHistory
Boolean isMessageHistory()Returns whether message history is enabled- Returns:
- true if message history is enabled
-
setLogMask
Sets whether security mask for Logging is enabled or not (default is disabled).- Parameters:
logMask
- true if mask is enabled
-
isLogMask
Boolean isLogMask()Gets whether security mask for Logging is enabled or not.- Returns:
- true if mask is enabled
-
setLogExhaustedMessageBody
Sets whether to log exhausted message body with message history.- Parameters:
logExhaustedMessageBody
- whether message body should be logged
-
isLogExhaustedMessageBody
Boolean isLogExhaustedMessageBody()Returns whether to log exhausted message body with message history.- Returns:
- true if logging of message body is enabled
-
setDelayer
Sets a delay value in millis that a message is delayed at every step it takes in the route path, slowing the process down to better observe what is occurring Is disabled by default- Parameters:
delay
- delay in millis
-
getDelayer
Long getDelayer()Gets the delay value- Returns:
- delay in millis, or null if disabled
-
setAutoStartup
Sets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, asCamelContext
s are always started.
Note: When setting auto startup false onCamelContext
then that takes precedence and no routes is started. You would need to startCamelContext
explicit using theCamelContextLifecycle.start()
method, to start the context, and then you would need to start the routes manually usingRouteController.startRoute(String)
. Default is true to always start up.- Parameters:
autoStartup
- whether to start up automatically.
-
isAutoStartup
Boolean isAutoStartup()Gets whether the object should automatically start when Camel starts. Important: Currently only routes can be disabled, asCamelContext
s are always started.
Default is true to always start up.- Returns:
- true if object should automatically start
-
setShutdownRoute
Sets the ShutdownRoute option for routes.- Parameters:
shutdownRoute
- the option to use.
-
getShutdownRoute
ShutdownRoute getShutdownRoute()Gets the option to use when shutting down the route.- Returns:
- the option
-
setShutdownRunningTask
Sets the ShutdownRunningTask option to use when shutting down a route.- Parameters:
shutdownRunningTask
- the option to use.
-
getShutdownRunningTask
ShutdownRunningTask getShutdownRunningTask()Gets the ShutdownRunningTask option in use when shutting down a route.- Returns:
- the option
-
setAllowUseOriginalMessage
Sets whether to allow access to the original message from Camel's error handler, or fromUnitOfWork.getOriginalInMessage()
. Turning this off can optimize performance, as defensive copy of the original message is not needed.- Parameters:
allowUseOriginalMessage
- the option to use.
-
isAllowUseOriginalMessage
Boolean isAllowUseOriginalMessage()Gets whether access to the original message from Camel's error handler, or fromUnitOfWork.getOriginalInMessage()
is allowed.- Returns:
- the option
-
isCaseInsensitiveHeaders
Boolean isCaseInsensitiveHeaders()Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. -
setCaseInsensitiveHeaders
Whether to use case sensitive or insensitive headers. Important: When using case sensitive (this is set to false). Then the map is case sensitive which means headers such as content-type and Content-Type are two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. -
isAutowiredEnabled
Boolean isAutowiredEnabled()Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. -
setAutowiredEnabled
Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.
-