Package org.apache.camel.main
Class MainConfigurationProperties
- java.lang.Object
-
- org.apache.camel.main.DefaultConfigurationProperties<MainConfigurationProperties>
-
- org.apache.camel.main.MainConfigurationProperties
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.camel.spi.BootstrapCloseable
@Configurer(bootstrap=true) public class MainConfigurationProperties extends DefaultConfigurationProperties<MainConfigurationProperties> implements org.apache.camel.spi.BootstrapCloseable
Global configuration for Camel Main to configure context name, stream caching and other global configurations.
-
-
Constructor Summary
Constructors Constructor Description MainConfigurationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfiguration(Class<? extends org.apache.camel.CamelConfiguration> configuration)
Adds configuration object to the known list of configurations objects.void
addConfiguration(org.apache.camel.CamelConfiguration configuration)
Adds configuration object to the known list of configurations objects.void
addLambdaRouteBuilder(org.apache.camel.builder.LambdaRouteBuilder routeBuilder)
Add an additionalLambdaRouteBuilder
object to the known list of builders.void
addRoutesBuilder(Class<?>... routeBuilder)
Add an additionalRoutesBuilder
class to the known list of builders.void
addRoutesBuilder(org.apache.camel.RoutesBuilder routeBuilder)
Add an additionalRoutesBuilder
object to the known list of builders.void
close()
FaultToleranceConfigurationProperties
faultTolerance()
To configure Circuit Breaker EIP with MicroProfile Fault ToleranceString
getBasePackageScan()
String
getConfigurationClasses()
List<org.apache.camel.CamelConfiguration>
getConfigurations()
int
getDurationHitExitCode()
int
getExtraShutdownTimeout()
String
getRoutesBuilderClasses()
List<org.apache.camel.RoutesBuilder>
getRoutesBuilders()
boolean
hasFaultToleranceConfiguration()
Whether there has been any MicroProfile Fault Tolerance EIP configuration specifiedboolean
hasHealthCheckConfiguration()
Whether there has been any health check configuration specifiedboolean
hasLraConfiguration()
Whether there has been any Saga LRA configuration specifiedboolean
hasResilience4jConfiguration()
Whether there has been any Resilience4j EIP configuration specifiedboolean
hasRestConfiguration()
Whether there has been any rest configuration specifiedboolean
hasThreadPoolConfiguration()
Whether there has been any thread pool configuration specifiedboolean
hasVaultConfiguration()
Whether there has been any vault configuration specifiedHealthConfigurationProperties
health()
To configure Health Checkboolean
isAutoConfigurationEnabled()
boolean
isAutoConfigurationEnvironmentVariablesEnabled()
boolean
isAutoConfigurationFailFast()
boolean
isAutoConfigurationLogSummary()
boolean
isAutoConfigurationSystemPropertiesEnabled()
boolean
isBasePackageScanEnabled()
LraConfigurationProperties
lra()
To configure Saga LRAResilience4jConfigurationProperties
resilience4j()
To configure Circuit Breaker EIP with Resilience4jRestConfigurationProperties
rest()
To configure Rest DSLvoid
setAutoConfigurationEnabled(boolean autoConfigurationEnabled)
Whether auto configuration of components, dataformats, languages is enabled or not.void
setAutoConfigurationEnvironmentVariablesEnabled(boolean autoConfigurationEnvironmentVariablesEnabled)
Whether auto configuration should include OS environment variables as well.void
setAutoConfigurationFailFast(boolean autoConfigurationFailFast)
Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason such as a invalid property name, etc.void
setAutoConfigurationLogSummary(boolean autoConfigurationLogSummary)
Whether auto configuration should log a summary with the configured properties.void
setAutoConfigurationSystemPropertiesEnabled(boolean autoConfigurationSystemPropertiesEnabled)
Whether auto configuration should include JVM system properties as well.void
setBasePackageScan(String basePackageScan)
Package name to use as base (offset) for classpath scanning ofRouteBuilder
, andTypeConverter
classes.void
setBasePackageScanEnabled(boolean basePackageScanEnabled)
Whether base package scan is enabled.void
setConfigurationClasses(String configurations)
Sets classes names that will be used to configure the camel context as example by providing custom beans throughBindToRegistry
annotation.void
setConfigurations(List<org.apache.camel.CamelConfiguration> configurations)
Sets the configuration objects used to configure the camel context.void
setDurationHitExitCode(int durationHitExitCode)
Sets the exit code for the application if duration was hitvoid
setExtraShutdownTimeout(int extraShutdownTimeout)
Extra timeout in seconds to graceful shutdown Camel.void
setRoutesBuilderClasses(String builders)
Sets classes names that implementRoutesBuilder
.void
setRoutesBuilders(List<org.apache.camel.RoutesBuilder> routesBuilders)
Sets the RoutesBuilder instances.ThreadPoolConfigurationProperties
threadPool()
To configure thread poolsVaultConfigurationProperties
vault()
To configure access to AWS vaultsMainConfigurationProperties
withAdditionalLambdaRouteBuilder(org.apache.camel.builder.LambdaRouteBuilder builder)
Add an additionalLambdaRouteBuilder
object to the known list of builders.MainConfigurationProperties
withAdditionalRoutesBuilder(Class... builders)
Add an additionalRoutesBuilder
class to the known list of builders.MainConfigurationProperties
withAdditionalRoutesBuilder(org.apache.camel.RoutesBuilder builder)
Add an additionalRoutesBuilder
object to the known list of builders.MainConfigurationProperties
withAutoConfigurationEnabled(boolean autoConfigurationEnabled)
Whether auto configuration of components/dataformats/languages is enabled or not.MainConfigurationProperties
withAutoConfigurationEnvironmentVariablesEnabled(boolean autoConfigurationEnvironmentVariablesEnabled)
Whether auto configuration should include OS environment variables as well.MainConfigurationProperties
withAutoConfigurationFailFast(boolean autoConfigurationFailFast)
Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason such as a invalid property name, etc.MainConfigurationProperties
withAutoConfigurationLogSummary(boolean autoConfigurationLogSummary)
Whether auto configuration should log a summary with the configured properties.MainConfigurationProperties
withAutoConfigurationSystemPropertiesEnabled(boolean autoConfigurationSystemPropertiesEnabled)
Whether auto configuration should include JVM system properties as well.MainConfigurationProperties
withBasePackageScan(String basePackageScan)
Package name to use as base (offset) for classpath scanning ofRouteBuilder
, andTypeConverter
classes.MainConfigurationProperties
withBasePackageScanEnabled(boolean basePackageScanEnabled)
Whether base package scan is enabled.MainConfigurationProperties
withConfigurations(Class<? extends org.apache.camel.CamelConfiguration>... configuration)
Adds a configuration class to the known list of configurations classes.MainConfigurationProperties
withConfigurations(String configurations)
Adds classes names that will be used to configure the camel context as example by providing custom beans throughBindToRegistry
annotation.MainConfigurationProperties
withConfigurations(List<org.apache.camel.CamelConfiguration> configurations)
Sets the configuration objects used to configure the camel context.MainConfigurationProperties
withDurationHitExitCode(int durationHitExitCode)
Sets the exit code for the application if duration was hitMainConfigurationProperties
withExtraShutdownTimeout(int extraShutdownTimeout)
Extra timeout in seconds to graceful shutdown Camel.MainConfigurationProperties
withRoutesBuilderClasses(String builders)
Sets classes names that implementRoutesBuilder
.MainConfigurationProperties
withRoutesBuilders(List<org.apache.camel.RoutesBuilder> builders)
Sets the RoutesBuilder instances.-
Methods inherited from class org.apache.camel.main.DefaultConfigurationProperties
addGlobalOption, getBeanIntrospectionLoggingLevel, getConsumerTemplateCacheSize, getDescription, getDurationMaxAction, getDurationMaxIdleSeconds, getDurationMaxMessages, getDurationMaxSeconds, getExchangeFactory, getExchangeFactoryCapacity, getFileConfigurations, getGlobalOptions, getJavaRoutesExcludePattern, getJavaRoutesIncludePattern, getJmxManagementMBeansLevel, getJmxManagementNamePattern, getJmxManagementStatisticsLevel, getLogDebugMaxChars, getMdcLoggingKeysPattern, getName, getProducerTemplateCacheSize, getRouteControllerBackOffDelay, getRouteControllerBackOffMaxAttempts, getRouteControllerBackOffMaxDelay, getRouteControllerBackOffMaxElapsedTime, getRouteControllerBackOffMultiplier, getRouteControllerExcludeRoutes, getRouteControllerIncludeRoutes, getRouteControllerInitialDelay, getRouteControllerLoggingLevel, getRouteControllerThreadPoolSize, getRouteFilterExcludePattern, getRouteFilterIncludePattern, getRoutesExcludePattern, getRoutesIncludePattern, getRoutesReloadDirectory, getRoutesReloadPattern, getShutdownTimeout, getStartupRecorder, getStartupRecorderDir, getStartupRecorderDuration, getStartupRecorderMaxDepth, getStartupRecorderProfile, getStartupSummaryLevel, getStreamCachingAllowClasses, getStreamCachingBufferSize, getStreamCachingDenyClasses, getStreamCachingSpoolCipher, getStreamCachingSpoolDirectory, getStreamCachingSpoolThreshold, getStreamCachingSpoolUsedHeapMemoryLimit, getStreamCachingSpoolUsedHeapMemoryThreshold, getThreadNamePattern, getTracingLoggingFormat, getTracingPattern, getUuidGenerator, isAllowUseOriginalMessage, isAutoStartup, isAutowiredEnabled, isBacklogTracing, isBacklogTracingStandby, isBacklogTracingTemplates, isBeanIntrospectionExtendedStatistics, isBeanPostProcessorEnabled, isCamelEventsTimestampEnabled, isCaseInsensitiveHeaders, isContextReloadEnabled, isDebugging, isDevConsoleEnabled, isDumpRoutes, isEndpointBridgeErrorHandler, isEndpointLazyStartProducer, isEndpointRuntimeStatisticsEnabled, isExchangeFactoryStatisticsEnabled, isInflightRepositoryBrowseEnabled, isJmxEnabled, isLightweight, isLoadHealthChecks, isLoadStatisticsEnabled, isLoadTypeConverters, isLogExhaustedMessageBody, isLogMask, isMessageHistory, isModeline, isRouteControllerSuperviseEnabled, isRouteControllerUnhealthyOnExhausted, isRoutesCollectorEnabled, isRoutesReloadDirectoryRecursive, isRoutesReloadEnabled, isRoutesReloadRemoveAllRoutes, isRoutesReloadRestartDuration, isShutdownLogInflightExchangesOnTimeout, isShutdownNowOnTimeout, isShutdownRoutesInReverseOrder, isShutdownSuppressLoggingOnTimeout, isSourceLocationEnabled, isStartupRecorderRecording, isStreamCachingAnySpoolRules, isStreamCachingEnabled, isStreamCachingRemoveSpoolDirectoryWhenStopping, isStreamCachingSpoolEnabled, isStreamCachingStatisticsEnabled, isTracing, isTracingStandby, isTracingTemplates, isTypeConverterStatisticsEnabled, isUseBreadcrumb, isUseDataType, isUseMdcLogging, setAllowUseOriginalMessage, setAutoStartup, setAutowiredEnabled, setBacklogTracing, setBacklogTracingStandby, setBacklogTracingTemplates, setBeanIntrospectionExtendedStatistics, setBeanIntrospectionLoggingLevel, setBeanPostProcessorEnabled, setCamelEventsTimestampEnabled, setCaseInsensitiveHeaders, setConsumerTemplateCacheSize, setContextReloadEnabled, setDebugging, setDescription, setDevConsoleEnabled, setDumpRoutes, setDurationMaxAction, setDurationMaxIdleSeconds, setDurationMaxMessages, setDurationMaxSeconds, setEndpointBridgeErrorHandler, setEndpointLazyStartProducer, setEndpointRuntimeStatisticsEnabled, setExchangeFactory, setExchangeFactoryCapacity, setExchangeFactoryStatisticsEnabled, setFileConfigurations, setGlobalOptions, setInflightRepositoryBrowseEnabled, setJavaRoutesExcludePattern, setJavaRoutesIncludePattern, setJmxEnabled, setJmxManagementMBeansLevel, setJmxManagementNamePattern, setJmxManagementStatisticsLevel, setLightweight, setLoadHealthChecks, setLoadStatisticsEnabled, setLoadTypeConverters, setLogDebugMaxChars, setLogExhaustedMessageBody, setLogMask, setMdcLoggingKeysPattern, setMessageHistory, setModeline, setName, setProducerTemplateCacheSize, setRouteControllerBackOffDelay, setRouteControllerBackOffMaxAttempts, setRouteControllerBackOffMaxDelay, setRouteControllerBackOffMaxElapsedTime, setRouteControllerBackOffMultiplier, setRouteControllerExcludeRoutes, setRouteControllerIncludeRoutes, setRouteControllerInitialDelay, setRouteControllerLoggingLevel, setRouteControllerSuperviseEnabled, setRouteControllerThreadPoolSize, setRouteControllerUnhealthyOnExhausted, setRouteFilterExcludePattern, setRouteFilterIncludePattern, setRoutesCollectorEnabled, setRoutesExcludePattern, setRoutesIncludePattern, setRoutesReloadDirectory, setRoutesReloadDirectoryRecursive, setRoutesReloadEnabled, setRoutesReloadPattern, setRoutesReloadRemoveAllRoutes, setRoutesReloadRestartDuration, setShutdownLogInflightExchangesOnTimeout, setShutdownNowOnTimeout, setShutdownRoutesInReverseOrder, setShutdownSuppressLoggingOnTimeout, setShutdownTimeout, setSourceLocationEnabled, setStartupRecorder, setStartupRecorderDir, setStartupRecorderDuration, setStartupRecorderMaxDepth, setStartupRecorderProfile, setStartupRecorderRecording, setStartupSummaryLevel, setStreamCachingAllowClasses, setStreamCachingAnySpoolRules, setStreamCachingBufferSize, setStreamCachingDenyClasses, setStreamCachingEnabled, setStreamCachingRemoveSpoolDirectoryWhenStopping, setStreamCachingSpoolCipher, setStreamCachingSpoolDirectory, setStreamCachingSpoolEnabled, setStreamCachingSpoolThreshold, setStreamCachingSpoolUsedHeapMemoryLimit, setStreamCachingSpoolUsedHeapMemoryThreshold, setStreamCachingStatisticsEnabled, setThreadNamePattern, setTracing, setTracingLoggingFormat, setTracingPattern, setTracingStandby, setTracingTemplates, setTypeConverterStatisticsEnabled, setUseBreadcrumb, setUseDataType, setUseMdcLogging, setUuidGenerator, withAllowUseOriginalMessage, withAutoStartup, withBacklogTracing, withBacklogTracingStandby, withBacklogTracingTemplates, withBeanIntrospectionExtendedStatistics, withBeanIntrospectionLoggingLevel, withBeanPostProcessorEnabled, withCamelEventsTimestampEnabled, withCaseInsensitiveHeaders, withConsumerTemplateCacheSize, withContextReloadEnabled, withDebugging, withDescription, withDevConsoleEnabled, withDumpRoutes, withDurationMaxAction, withDurationMaxIdleSeconds, withDurationMaxMessages, withDurationMaxSeconds, withEndpointBridgeErrorHandler, withEndpointLazyStartProducer, withEndpointRuntimeStatisticsEnabled, withExchangeFactory, withExchangeFactoryCapacity, withExchangeFactoryStatisticsEnabled, withFileConfigurations, withGlobalOption, withGlobalOptions, withInflightRepositoryBrowseEnabled, withJavaRoutesExcludePattern, withJavaRoutesIncludePattern, withJmxEnabled, withJmxManagementMBeansLevel, withJmxManagementNamePattern, withJmxManagementStatisticsLevel, withLightweight, withLoadHealthChecks, withLoadStatisticsEnabled, withLoadTypeConverters, withLogDebugMaxChars, withLogExhaustedMessageBody, withLogMask, withMdcLoggingKeysPattern, withMessageHistory, withModeline, withName, withProducerTemplateCacheSize, withRouteControllerBackOffDelay, withRouteControllerBackOffMaxAttempts, withRouteControllerBackOffMaxDelay, withRouteControllerBackOffMaxElapsedTime, withRouteControllerBackOffMultiplier, withRouteControllerExcludeRoutes, withRouteControllerIncludeRoutes, withRouteControllerInitialDelay, withRouteControllerLoggingLevel, withRouteControllerSuperviseEnabled, withRouteControllerThreadPoolSize, withRouteControllerUnhealthyOnExhausted, withRouteFilterExcludePattern, withRouteFilterIncludePattern, withRoutesCollectorEnabled, withRoutesExcludePattern, withRoutesIncludePattern, withRoutesReloadDirectory, withRoutesReloadDirectoryRecursive, withRoutesReloadEnabled, withRoutesReloadPattern, withRoutesReloadRemoveAllRoutes, withRoutesReloadRestartDuration, withShutdownLogInflightExchangesOnTimeout, withShutdownNowOnTimeout, withShutdownRoutesInReverseOrder, withShutdownSuppressLoggingOnTimeout, withShutdownTimeout, withSourceLocationEnabled, withStartupRecorder, withStartupRecorderDir, withStartupRecorderDuration, withStartupRecorderMaxDepth, withStartupRecorderProfile, withStartupRecorderRecording, withStreamCachingAllowClasses, withStreamCachingAnySpoolRules, withStreamCachingBufferSize, withStreamCachingDenyClasses, withStreamCachingEnabled, withStreamCachingRemoveSpoolDirectoryWhenStopping, withStreamCachingSpoolCipher, withStreamCachingSpoolDirectory, withStreamCachingSpoolEnabled, withStreamCachingSpoolThreshold, withStreamCachingSpoolUsedHeapMemoryLimit, withStreamCachingSpoolUsedHeapMemoryThreshold, withStreamCachingStatisticsEnabled, withThreadNamePattern, withTracing, withTracingLoggingFormat, withTracingPattern, withTracingStandby, withTracingTemplates, withTypeConverterStatisticsEnabled, withUseBreadcrumb, withUseDataType, withUseMdcLogging
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
health
public HealthConfigurationProperties health()
To configure Health Check
-
hasHealthCheckConfiguration
public boolean hasHealthCheckConfiguration()
Whether there has been any health check configuration specified
-
lra
public LraConfigurationProperties lra()
To configure Saga LRA
-
hasLraConfiguration
public boolean hasLraConfiguration()
Whether there has been any Saga LRA configuration specified
-
threadPool
public ThreadPoolConfigurationProperties threadPool()
To configure thread pools
-
hasThreadPoolConfiguration
public boolean hasThreadPoolConfiguration()
Whether there has been any thread pool configuration specified
-
resilience4j
public Resilience4jConfigurationProperties resilience4j()
To configure Circuit Breaker EIP with Resilience4j
-
hasResilience4jConfiguration
public boolean hasResilience4jConfiguration()
Whether there has been any Resilience4j EIP configuration specified
-
faultTolerance
public FaultToleranceConfigurationProperties faultTolerance()
To configure Circuit Breaker EIP with MicroProfile Fault Tolerance
-
hasFaultToleranceConfiguration
public boolean hasFaultToleranceConfiguration()
Whether there has been any MicroProfile Fault Tolerance EIP configuration specified
-
rest
public RestConfigurationProperties rest()
To configure Rest DSL
-
hasRestConfiguration
public boolean hasRestConfiguration()
Whether there has been any rest configuration specified
-
vault
public VaultConfigurationProperties vault()
To configure access to AWS vaults
-
hasVaultConfiguration
public boolean hasVaultConfiguration()
Whether there has been any vault configuration specified
-
isAutoConfigurationEnabled
public boolean isAutoConfigurationEnabled()
-
setAutoConfigurationEnabled
public void setAutoConfigurationEnabled(boolean autoConfigurationEnabled)
Whether auto configuration of components, dataformats, languages is enabled or not. When enabled the configuration parameters are loaded from the properties component. You can prefix the parameters in the properties file with: - camel.component.name.option1=value1 - camel.component.name.option2=value2 - camel.dataformat.name.option1=value1 - camel.dataformat.name.option2=value2 - camel.language.name.option1=value1 - camel.language.name.option2=value2 Where name is the name of the component, dataformat or language such as seda,direct,jaxb. The auto configuration also works for any options on components that is a complex type (not standard Java type) and there has been an explicit single bean instance registered to the Camel registry via theRegistry.bind(String, Object)
method or by using theBindToRegistry
annotation style. This option is default enabled.
-
isAutoConfigurationEnvironmentVariablesEnabled
public boolean isAutoConfigurationEnvironmentVariablesEnabled()
-
setAutoConfigurationEnvironmentVariablesEnabled
public void setAutoConfigurationEnvironmentVariablesEnabled(boolean autoConfigurationEnvironmentVariablesEnabled)
Whether auto configuration should include OS environment variables as well. When enabled this allows to overrule any configuration using an OS environment variable. For example to set a shutdown timeout of 5 seconds: CAMEL_MAIN_SHUTDOWNTIMEOUT=5. This option is default enabled.
-
isAutoConfigurationSystemPropertiesEnabled
public boolean isAutoConfigurationSystemPropertiesEnabled()
-
setAutoConfigurationSystemPropertiesEnabled
public void setAutoConfigurationSystemPropertiesEnabled(boolean autoConfigurationSystemPropertiesEnabled)
Whether auto configuration should include JVM system properties as well. When enabled this allows to overrule any configuration using a JVM system property. For example to set a shutdown timeout of 5 seconds: -D camel.main.shutdown-timeout=5. Note that JVM system properties take precedence over OS environment variables. This option is default enabled.
-
isAutoConfigurationFailFast
public boolean isAutoConfigurationFailFast()
-
setAutoConfigurationFailFast
public void setAutoConfigurationFailFast(boolean autoConfigurationFailFast)
Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason such as a invalid property name, etc. This option is default enabled.
-
isAutoConfigurationLogSummary
public boolean isAutoConfigurationLogSummary()
-
setAutoConfigurationLogSummary
public void setAutoConfigurationLogSummary(boolean autoConfigurationLogSummary)
Whether auto configuration should log a summary with the configured properties. This option is default enabled.
-
getBasePackageScan
public String getBasePackageScan()
-
setBasePackageScan
public void setBasePackageScan(String basePackageScan)
Package name to use as base (offset) for classpath scanning ofRouteBuilder
, andTypeConverter
classes. If you are using Spring Boot then it is instead recommended to use Spring Boots component scanning and annotate your route builder classes with `@Component`. In other words only use this for Camel Main in standalone mode.
-
isBasePackageScanEnabled
public boolean isBasePackageScanEnabled()
-
setBasePackageScanEnabled
public void setBasePackageScanEnabled(boolean basePackageScanEnabled)
Whether base package scan is enabled.
-
getDurationHitExitCode
public int getDurationHitExitCode()
-
setDurationHitExitCode
public void setDurationHitExitCode(int durationHitExitCode)
Sets the exit code for the application if duration was hit
-
getExtraShutdownTimeout
public int getExtraShutdownTimeout()
-
setExtraShutdownTimeout
public void setExtraShutdownTimeout(int extraShutdownTimeout)
Extra timeout in seconds to graceful shutdown Camel. When Camel is shutting down then Camel first shutdown all the routes (shutdownTimeout). Then additional services is shutdown (extraShutdownTimeout).
-
getConfigurationClasses
public String getConfigurationClasses()
-
setConfigurationClasses
public void setConfigurationClasses(String configurations)
Sets classes names that will be used to configure the camel context as example by providing custom beans throughBindToRegistry
annotation.
-
addConfiguration
public void addConfiguration(org.apache.camel.CamelConfiguration configuration)
Adds configuration object to the known list of configurations objects.
-
addConfiguration
public void addConfiguration(Class<? extends org.apache.camel.CamelConfiguration> configuration)
Adds configuration object to the known list of configurations objects.
-
getConfigurations
public List<org.apache.camel.CamelConfiguration> getConfigurations()
-
setConfigurations
public void setConfigurations(List<org.apache.camel.CamelConfiguration> configurations)
Sets the configuration objects used to configure the camel context.
-
getRoutesBuilderClasses
public String getRoutesBuilderClasses()
-
setRoutesBuilderClasses
public void setRoutesBuilderClasses(String builders)
Sets classes names that implementRoutesBuilder
.
-
getRoutesBuilders
public List<org.apache.camel.RoutesBuilder> getRoutesBuilders()
-
setRoutesBuilders
public void setRoutesBuilders(List<org.apache.camel.RoutesBuilder> routesBuilders)
Sets the RoutesBuilder instances.
-
addRoutesBuilder
public void addRoutesBuilder(org.apache.camel.RoutesBuilder routeBuilder)
Add an additionalRoutesBuilder
object to the known list of builders.
-
addRoutesBuilder
public void addRoutesBuilder(Class<?>... routeBuilder)
Add an additionalRoutesBuilder
class to the known list of builders.
-
addLambdaRouteBuilder
public void addLambdaRouteBuilder(org.apache.camel.builder.LambdaRouteBuilder routeBuilder)
Add an additionalLambdaRouteBuilder
object to the known list of builders.
-
withAutoConfigurationEnabled
public MainConfigurationProperties withAutoConfigurationEnabled(boolean autoConfigurationEnabled)
Whether auto configuration of components/dataformats/languages is enabled or not. When enabled the configuration parameters are loaded from the properties component and configured as defaults (similar to spring-boot auto-configuration). You can prefix the parameters in the properties file with: - camel.component.name.option1=value1 - camel.component.name.option2=value2 - camel.dataformat.name.option1=value1 - camel.dataformat.name.option2=value2 - camel.language.name.option1=value1 - camel.language.name.option2=value2 Where name is the name of the component, dataformat or language such as seda,direct,jaxb. The auto configuration also works for any options on components that is a complex type (not standard Java type) and there has been an explicit single bean instance registered to the Camel registry via theRegistry.bind(String, Object)
method or by using theBindToRegistry
annotation style. This option is default enabled.
-
withAutoConfigurationEnvironmentVariablesEnabled
public MainConfigurationProperties withAutoConfigurationEnvironmentVariablesEnabled(boolean autoConfigurationEnvironmentVariablesEnabled)
Whether auto configuration should include OS environment variables as well. When enabled this allows to overrule any configuration using an OS environment variable. For example to set a shutdown timeout of 5 seconds: CAMEL_MAIN_SHUTDOWNTIMEOUT=5. This option is default enabled.
-
withAutoConfigurationSystemPropertiesEnabled
public MainConfigurationProperties withAutoConfigurationSystemPropertiesEnabled(boolean autoConfigurationSystemPropertiesEnabled)
Whether auto configuration should include JVM system properties as well. When enabled this allows to overrule any configuration using a JVM system property. For example to set a shutdown timeout of 5 seconds: -D camel.main.shutdown-timeout=5. Note that JVM system properties take precedence over OS environment variables. This option is default enabled.
-
withAutoConfigurationFailFast
public MainConfigurationProperties withAutoConfigurationFailFast(boolean autoConfigurationFailFast)
Whether auto configuration should fail fast when configuring one ore more properties fails for whatever reason such as a invalid property name, etc. This option is default enabled.
-
withAutoConfigurationLogSummary
public MainConfigurationProperties withAutoConfigurationLogSummary(boolean autoConfigurationLogSummary)
Whether auto configuration should log a summary with the configured properties. This option is default enabled.
-
withDurationHitExitCode
public MainConfigurationProperties withDurationHitExitCode(int durationHitExitCode)
Sets the exit code for the application if duration was hit
-
withExtraShutdownTimeout
public MainConfigurationProperties withExtraShutdownTimeout(int extraShutdownTimeout)
Extra timeout in seconds to graceful shutdown Camel. When Camel is shutting down then Camel first shutdown all the routes (shutdownTimeout). Then additional services is shutdown (extraShutdownTimeout).
-
withBasePackageScan
public MainConfigurationProperties withBasePackageScan(String basePackageScan)
Package name to use as base (offset) for classpath scanning ofRouteBuilder
, andTypeConverter
classes. If you are using Spring Boot then it is instead recommended to use Spring Boots component scanning and annotate your route builder classes with `@Component`. In other words only use this for Camel Main in standalone mode.
-
withBasePackageScanEnabled
public MainConfigurationProperties withBasePackageScanEnabled(boolean basePackageScanEnabled)
Whether base package scan is enabled.
-
withConfigurations
public MainConfigurationProperties withConfigurations(String configurations)
Adds classes names that will be used to configure the camel context as example by providing custom beans throughBindToRegistry
annotation.
-
withConfigurations
public MainConfigurationProperties withConfigurations(Class<? extends org.apache.camel.CamelConfiguration>... configuration)
Adds a configuration class to the known list of configurations classes.
-
withConfigurations
public MainConfigurationProperties withConfigurations(List<org.apache.camel.CamelConfiguration> configurations)
Sets the configuration objects used to configure the camel context.
-
withRoutesBuilderClasses
public MainConfigurationProperties withRoutesBuilderClasses(String builders)
Sets classes names that implementRoutesBuilder
.
-
withRoutesBuilders
public MainConfigurationProperties withRoutesBuilders(List<org.apache.camel.RoutesBuilder> builders)
Sets the RoutesBuilder instances.
-
withAdditionalRoutesBuilder
public MainConfigurationProperties withAdditionalRoutesBuilder(org.apache.camel.RoutesBuilder builder)
Add an additionalRoutesBuilder
object to the known list of builders.
-
withAdditionalRoutesBuilder
public MainConfigurationProperties withAdditionalRoutesBuilder(Class... builders)
Add an additionalRoutesBuilder
class to the known list of builders.
-
withAdditionalLambdaRouteBuilder
public MainConfigurationProperties withAdditionalLambdaRouteBuilder(org.apache.camel.builder.LambdaRouteBuilder builder)
Add an additionalLambdaRouteBuilder
object to the known list of builders.
-
-