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(extended=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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
addMainListener
(Class<? extends MainListener> listener) Adds main listener class to the known list of listener objects.void
addMainListener
(MainListener listener) Adds main listener object to the known list of listener objects.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()
To configure Debugger.To configure Circuit Breaker EIP with MicroProfile Fault ToleranceList
<org.apache.camel.CamelConfiguration> int
int
List
<org.apache.camel.RoutesBuilder> boolean
Whether there has been any Debugger configuration specified.boolean
Whether there has been any MicroProfile Fault Tolerance EIP configuration specifiedboolean
Whether there has been any health check configuration specifiedboolean
Whether there has been any embedded HTTP server configuration specifiedboolean
Whether there has been any Saga LRA configuration specifiedboolean
Whether there has been any Micrometer metrics configuration specifiedboolean
Whether there has been any OpenTelemetry configuration specifiedboolean
Whether there has been any Resilience4j EIP configuration specifiedboolean
Whether there has been any rest configuration specifiedboolean
Whether there has been any Route Controller configuration specified.boolean
Whether there has been any SSL configuration specified.boolean
Whether there has been any thread pool configuration specifiedboolean
Whether there has been any Tracer configuration specified.boolean
Whether there has been any vault configuration specifiedhealth()
To configure Health CheckTo configure embedded HTTP server (for standalone applications; not Spring Boot or Quarkus)boolean
boolean
boolean
boolean
boolean
boolean
lra()
To configure Saga LRAmetrics()
To configure Micrometer metrics.otel()
To configure OpenTelemetry.To configure Circuit Breaker EIP with Resilience4jrest()
To configure Rest DSLTo configure Route Controller.void
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
,TypeConverter
,CamelConfiguration
classes, and also classes annotated withConverter
, orBindToRegistry
.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
setMainListenerClasses
(String mainListenerClasses) Sets classes names that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main.void
setMainListeners
(List<MainListener> mainListeners) Sets main listener objects that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main.void
setProfile
(String profile) Camel profile to use when running.void
setRoutesBuilderClasses
(String builders) Sets classes names that implementRoutesBuilder
.void
setRoutesBuilders
(List<org.apache.camel.RoutesBuilder> routesBuilders) Sets the RoutesBuilder instances.To configure SSL.To configure startup conditionsTo configure thread poolsTo configure Tracer.vault()
To configure access to AWS vaultswithAdditionalLambdaRouteBuilder
(org.apache.camel.builder.LambdaRouteBuilder builder) Add an additionalLambdaRouteBuilder
object to the known list of builders.withAdditionalRoutesBuilder
(Class... builders) Add an additionalRoutesBuilder
class to the known list of builders.withAdditionalRoutesBuilder
(org.apache.camel.RoutesBuilder builder) Add an additionalRoutesBuilder
object to the known list of builders.withAutoConfigurationEnabled
(boolean autoConfigurationEnabled) Whether auto configuration of components/dataformats/languages is enabled or not.withAutoConfigurationEnvironmentVariablesEnabled
(boolean autoConfigurationEnvironmentVariablesEnabled) Whether auto configuration should include OS environment variables as well.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.withAutoConfigurationLogSummary
(boolean autoConfigurationLogSummary) Whether auto configuration should log a summary with the configured properties.withAutoConfigurationSystemPropertiesEnabled
(boolean autoConfigurationSystemPropertiesEnabled) Whether auto configuration should include JVM system properties as well.withBasePackageScan
(String basePackageScan) Package name to use as base (offset) for classpath scanning ofRouteBuilder
,TypeConverter
,CamelConfiguration
classes, and also classes annotated withConverter
, orBindToRegistry
.withBasePackageScanEnabled
(boolean basePackageScanEnabled) Whether base package scan is enabled.withConfigurations
(Class<? extends org.apache.camel.CamelConfiguration>... configuration) Adds a configuration class to the known list of configurations classes.withConfigurations
(String configurations) Adds classes names that will be used to configure the camel context as example by providing custom beans throughBindToRegistry
annotation.withConfigurations
(List<org.apache.camel.CamelConfiguration> configurations) Sets the configuration objects used to configure the camel context.withDurationHitExitCode
(int durationHitExitCode) Sets the exit code for the application if duration was hitwithExtraShutdownTimeout
(int extraShutdownTimeout) Extra timeout in seconds to graceful shutdown Camel.withMainListeners
(Class<? extends MainListener>... listeners) Adds main listener object to the known list of listener objects.withMainListeners
(String listeners) Sets classes names that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main.withMainListeners
(List<MainListener> listeners) Adds main listener object to the known list of listener objects.withProfile
(String profile) Camel profile to use when running.withRoutesBuilderClasses
(String builders) Sets classes names that implementRoutesBuilder
.withRoutesBuilders
(List<org.apache.camel.RoutesBuilder> builders) Sets the RoutesBuilder instances.Methods inherited from class org.apache.camel.main.DefaultConfigurationProperties
addGlobalOption, getBeanIntrospectionLoggingLevel, getCloudPropertiesLocation, getCompileWorkDir, getConsumerTemplateCacheSize, getDescription, getDumpRoutes, getDumpRoutesInclude, getDumpRoutesOutput, getDurationMaxAction, getDurationMaxIdleSeconds, getDurationMaxMessages, getDurationMaxSeconds, getExchangeFactory, getExchangeFactoryCapacity, getFileConfigurations, getGlobalOptions, getJavaRoutesExcludePattern, getJavaRoutesIncludePattern, getJmxManagementMBeansLevel, getJmxManagementNamePattern, getJmxManagementStatisticsLevel, getLogDebugMaxChars, getLogLanguage, getLogName, getMdcLoggingKeysPattern, getName, getProducerTemplateCacheSize, 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, isBeanIntrospectionExtendedStatistics, isBeanPostProcessorEnabled, isCamelEventsTimestampEnabled, isCaseInsensitiveHeaders, isContextReloadEnabled, isDevConsoleEnabled, isDumpRoutesGeneratedIds, isDumpRoutesLog, isDumpRoutesResolvePlaceholders, isDumpRoutesUriAsParameters, isEndpointBridgeErrorHandler, isEndpointLazyStartProducer, isEndpointRuntimeStatisticsEnabled, isExchangeFactoryStatisticsEnabled, isInflightRepositoryBrowseEnabled, isJmxEnabled, isJmxManagementRegisterRoutesCreateByKamelet, isJmxManagementRegisterRoutesCreateByTemplate, isJmxUpdateRouteEnabled, isLightweight, isLoadHealthChecks, isLoadStatisticsEnabled, isLoadTypeConverters, isLogExhaustedMessageBody, isLogMask, isMessageHistory, isModeline, isRoutesCollectorEnabled, isRoutesCollectorIgnoreLoadingError, 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, setBeanIntrospectionExtendedStatistics, setBeanIntrospectionLoggingLevel, setBeanPostProcessorEnabled, setCamelEventsTimestampEnabled, setCaseInsensitiveHeaders, setCloudPropertiesLocation, setCompileWorkDir, setConsumerTemplateCacheSize, setContextReloadEnabled, setDescription, setDevConsoleEnabled, setDumpRoutes, setDumpRoutesGeneratedIds, setDumpRoutesInclude, setDumpRoutesLog, setDumpRoutesOutput, setDumpRoutesResolvePlaceholders, setDumpRoutesUriAsParameters, setDurationMaxAction, setDurationMaxIdleSeconds, setDurationMaxMessages, setDurationMaxSeconds, setEndpointBridgeErrorHandler, setEndpointLazyStartProducer, setEndpointRuntimeStatisticsEnabled, setExchangeFactory, setExchangeFactoryCapacity, setExchangeFactoryStatisticsEnabled, setFileConfigurations, setGlobalOptions, setInflightRepositoryBrowseEnabled, setJavaRoutesExcludePattern, setJavaRoutesIncludePattern, setJmxEnabled, setJmxManagementMBeansLevel, setJmxManagementNamePattern, setJmxManagementRegisterRoutesCreateByKamelet, setJmxManagementRegisterRoutesCreateByTemplate, setJmxManagementStatisticsLevel, setJmxUpdateRouteEnabled, setLightweight, setLoadHealthChecks, setLoadStatisticsEnabled, setLoadTypeConverters, setLogDebugMaxChars, setLogExhaustedMessageBody, setLogLanguage, setLogMask, setLogName, setMdcLoggingKeysPattern, setMessageHistory, setModeline, setName, setProducerTemplateCacheSize, setRouteFilterExcludePattern, setRouteFilterIncludePattern, setRoutesCollectorEnabled, setRoutesCollectorIgnoreLoadingError, 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, withBeanIntrospectionExtendedStatistics, withBeanIntrospectionLoggingLevel, withBeanPostProcessorEnabled, withCamelEventsTimestampEnabled, withCaseInsensitiveHeaders, withCloudPropertiesLocation, withCompileWorkDir, withConsumerTemplateCacheSize, withContextReloadEnabled, withDescription, withDevConsoleEnabled, withDumpRoutes, withDumpRoutesGeneratedIds, withDumpRoutesInclude, withDumpRoutesLog, withDumpRoutesOutput, withDumpRoutesResolvePlaceholders, withDumpRoutesUriAsParameters, withDurationMaxAction, withDurationMaxIdleSeconds, withDurationMaxMessages, withDurationMaxSeconds, withEndpointBridgeErrorHandler, withEndpointLazyStartProducer, withEndpointRuntimeStatisticsEnabled, withExchangeFactory, withExchangeFactoryCapacity, withExchangeFactoryStatisticsEnabled, withFileConfigurations, withGlobalOption, withGlobalOptions, withInflightRepositoryBrowseEnabled, withJavaRoutesExcludePattern, withJavaRoutesIncludePattern, withJmxEnabled, withJmxManagementMBeansLevel, withJmxManagementNamePattern, withJmxManagementRegisterRoutesCreateByKamelet, withJmxManagementRegisterRoutesCreateByTemplate, withJmxManagementStatisticsLevel, withLightweight, withLoadHealthChecks, withLoadStatisticsEnabled, withLoadTypeConverters, withLogDebugMaxChars, withLogExhaustedMessageBody, withLogLanguage, withLogMask, withLogName, withMdcLoggingKeysPattern, withMessageHistory, withModeline, withName, withProducerTemplateCacheSize, withRouteFilterExcludePattern, withRouteFilterIncludePattern, withRoutesCollectorEnabled, withRoutesCollectorIgnoreLoadingError, 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
-
Constructor Details
-
MainConfigurationProperties
public MainConfigurationProperties()
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
health
To configure Health Check -
startupCondition
To configure startup conditions -
hasHealthCheckConfiguration
public boolean hasHealthCheckConfiguration()Whether there has been any health check configuration specified -
lra
To configure Saga LRA -
hasLraConfiguration
public boolean hasLraConfiguration()Whether there has been any Saga LRA configuration specified -
otel
To configure OpenTelemetry. -
hasOtelConfiguration
public boolean hasOtelConfiguration()Whether there has been any OpenTelemetry configuration specified -
metrics
To configure Micrometer metrics. -
hasMetricsConfiguration
public boolean hasMetricsConfiguration()Whether there has been any Micrometer metrics configuration specified -
httpServer
To configure embedded HTTP server (for standalone applications; not Spring Boot or Quarkus) -
hasHttpServerConfiguration
public boolean hasHttpServerConfiguration()Whether there has been any embedded HTTP server configuration specified -
sslConfig
To configure SSL. -
hasSslConfiguration
public boolean hasSslConfiguration()Whether there has been any SSL configuration specified. -
debuggerConfig
To configure Debugger. -
hasDebuggerConfiguration
public boolean hasDebuggerConfiguration()Whether there has been any Debugger configuration specified. -
tracerConfig
To configure Tracer. -
hasTracerConfiguration
public boolean hasTracerConfiguration()Whether there has been any Tracer configuration specified. -
routeControllerConfig
To configure Route Controller. -
hasRouteControllerConfiguration
public boolean hasRouteControllerConfiguration()Whether there has been any Route Controller configuration specified. -
threadPool
To configure thread pools -
hasThreadPoolConfiguration
public boolean hasThreadPoolConfiguration()Whether there has been any thread pool configuration specified -
resilience4j
To configure Circuit Breaker EIP with Resilience4j -
hasResilience4jConfiguration
public boolean hasResilience4jConfiguration()Whether there has been any Resilience4j EIP configuration specified -
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
To configure Rest DSL -
hasRestConfiguration
public boolean hasRestConfiguration()Whether there has been any rest configuration specified -
vault
To configure access to AWS vaults -
hasVaultConfiguration
public boolean hasVaultConfiguration()Whether there has been any vault configuration specified -
getProfile
-
setProfile
Camel profile to use when running. The dev profile is for development, which enables a set of additional developer focus functionality, tracing, debugging, and gathering additional runtime statistics that are useful during development. However, those additional features has a slight overhead cost, and are not enabled for production profile. The default profile is prod. -
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
-
setBasePackageScan
Package name to use as base (offset) for classpath scanning ofRouteBuilder
,TypeConverter
,CamelConfiguration
classes, and also classes annotated withConverter
, orBindToRegistry
. 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). -
getMainListenerClasses
-
setMainListenerClasses
Sets classes names that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main. -
addMainListener
Adds main listener object to the known list of listener objects. -
addMainListener
Adds main listener class to the known list of listener objects. -
getMainListeners
-
setMainListeners
Sets main listener objects that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main. -
getConfigurationClasses
-
setConfigurationClasses
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
Adds configuration object to the known list of configurations objects. -
getConfigurations
-
setConfigurations
Sets the configuration objects used to configure the camel context. -
getRoutesBuilderClasses
-
setRoutesBuilderClasses
Sets classes names that implementRoutesBuilder
. -
getRoutesBuilders
-
setRoutesBuilders
Sets the RoutesBuilder instances. -
addRoutesBuilder
public void addRoutesBuilder(org.apache.camel.RoutesBuilder routeBuilder) Add an additionalRoutesBuilder
object to the known list of builders. -
addRoutesBuilder
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. -
withProfile
Camel profile to use when running. The dev profile is for development, which enables a set of additional developer focus functionality, tracing, debugging, and gathering additional runtime statistics that are useful during development. However, those additional features has a slight overhead cost, and are not enabled for production profile. The default profile is prod. -
withAutoConfigurationEnabled
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
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
Sets the exit code for the application if duration was hit -
withExtraShutdownTimeout
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
Package name to use as base (offset) for classpath scanning ofRouteBuilder
,TypeConverter
,CamelConfiguration
classes, and also classes annotated withConverter
, orBindToRegistry
. 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
Whether base package scan is enabled. -
withMainListeners
Sets classes names that will be used forMainListener
that makes it possible to do custom logic during starting and stopping camel-main. -
withMainListeners
Adds main listener object to the known list of listener objects. -
withMainListeners
Adds main listener object to the known list of listener objects. -
withConfigurations
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
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
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.
-