Class IntegrationProperties
java.lang.Object
org.springframework.integration.context.IntegrationProperties
Utility class to encapsulate infrastructure Integration properties constants and their default values.
 The default values can be overridden by the 
META-INF/spring.integration.properties with this entries
 (includes their default values):
 -  spring.integration.channels.autoCreate=true
-  spring.integration.channels.maxUnicastSubscribers=0x7fffffff
-  spring.integration.channels.maxBroadcastSubscribers=0x7fffffff
-  spring.integration.taskScheduler.poolSize=10
-  spring.integration.messagingTemplate.throwExceptionOnLateReply=false
-  spring.integration.readOnly.headers=
-  spring.integration.endpoints.noAutoStartup=
-  spring.integration.channels.error.requireSubscribers=true
-  spring.integration.channels.error.ignoreFailures=true
-  spring.integration.endpoints.defaultTimeout=30000
- Since:
- 3.0
- Author:
- Artem Bilan
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringSpecifies whether to allow create automaticallyDirectChannelbeans for non-declared channels or not.static final StringSpecifies the value forAbstractDispatcher.maxSubscribersin case of point-to-point channels (e.g.static final StringSpecifies the value forAbstractDispatcher.maxSubscribersin case of point-to-point channels (e.g.static final IntegrationPropertiesA singleton with default values.static final StringSpecifies the default timeout for blocking operations like send and receive messages.static final StringSpecifies the value ofAbstractEndpoint.autoStartup.static final StringSpecifies the value forPublishSubscribeChannel.ignoreFailureson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.static final StringSpecifies the value forPublishSubscribeChannel.requireSubscriberson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.static final Stringstatic final StringSpecifies the value ofDefaultMessageBuilderFactory.readOnlyHeaders.static final StringSpecifies the value ofThreadPoolTaskScheduler.poolSizefor thetaskSchedulerbean initialized by the Integration infrastructure.static final StringSpecifies the value ofGenericMessagingTemplate.throwExceptionOnLateReply.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Propertiesdefaults()intReturn the value ofCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.intReturn the value ofCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.longReturn the value ofENDPOINTS_DEFAULT_TIMEOUToption.static StringgetExpressionFor(String key) Build the bean property definition expression to resolve the value from Integration properties within the bean building phase.String[]Return the value ofENDPOINTS_NO_AUTO_STARTUPoption.String[]Return the value ofREAD_ONLY_HEADERSoption.intReturn the value ofTASK_SCHEDULER_POOL_SIZEoption.booleanReturn the value ofCHANNELS_AUTOCREATEoption.booleanReturn the value ofERROR_CHANNEL_IGNORE_FAILURESoption.booleanReturn the value ofERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.booleanReturn the value ofTHROW_EXCEPTION_ON_LATE_REPLYoption.static IntegrationPropertiesparse(Properties properties) Parse a providedPropertiesand build anIntegrationPropertiesinstance.voidsetChannelsAutoCreate(boolean channelsAutoCreate) Configure a value forCHANNELS_AUTOCREATEoption.voidsetChannelsMaxBroadcastSubscribers(int channelsMaxBroadcastSubscribers) Configure a value forCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.voidsetChannelsMaxUnicastSubscribers(int channelsMaxUnicastSubscribers) Configure a value forCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.voidsetEndpointsDefaultTimeout(long endpointsDefaultTimeout) Configure a value forENDPOINTS_DEFAULT_TIMEOUToption.voidsetErrorChannelIgnoreFailures(boolean errorChannelIgnoreFailures) Configure a value forERROR_CHANNEL_IGNORE_FAILURESoption.voidsetErrorChannelRequireSubscribers(boolean errorChannelRequireSubscribers) Configure a value forERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.voidsetMessagingTemplateThrowExceptionOnLateReply(boolean messagingTemplateThrowExceptionOnLateReply) Configure a value forTHROW_EXCEPTION_ON_LATE_REPLYoption.voidsetNoAutoStartupEndpoints(String... noAutoStartupEndpoints) Configure a value forENDPOINTS_NO_AUTO_STARTUPoption.voidsetReadOnlyHeaders(String... readOnlyHeaders) Configure a value forREAD_ONLY_HEADERSoption.voidsetTaskSchedulerPoolSize(int taskSchedulerPoolSize) Configure a value forTASK_SCHEDULER_POOL_SIZEoption.Represent the current instance as aProperties.
- 
Field Details- 
DEFAULT_INSTANCEA singleton with default values.
- 
INTEGRATION_PROPERTIES_PREFIX- See Also:
 
- 
CHANNELS_AUTOCREATESpecifies whether to allow create automaticallyDirectChannelbeans for non-declared channels or not.- See Also:
 
- 
CHANNELS_MAX_UNICAST_SUBSCRIBERSSpecifies the value forAbstractDispatcher.maxSubscribersin case of point-to-point channels (e.g.ExecutorChannel), if the attributemax-subscribersisn't configured on the channel component.- See Also:
 
- 
CHANNELS_MAX_BROADCAST_SUBSCRIBERSSpecifies the value forAbstractDispatcher.maxSubscribersin case of point-to-point channels (e.g.PublishSubscribeChannel), if the attributemax-subscribersisn't configured on the channel component.- See Also:
 
- 
ERROR_CHANNEL_REQUIRE_SUBSCRIBERSSpecifies the value forPublishSubscribeChannel.requireSubscriberson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.- See Also:
 
- 
ERROR_CHANNEL_IGNORE_FAILURESSpecifies the value forPublishSubscribeChannel.ignoreFailureson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.- See Also:
 
- 
TASK_SCHEDULER_POOL_SIZESpecifies the value ofThreadPoolTaskScheduler.poolSizefor thetaskSchedulerbean initialized by the Integration infrastructure.- See Also:
 
- 
THROW_EXCEPTION_ON_LATE_REPLYSpecifies the value ofGenericMessagingTemplate.throwExceptionOnLateReply.- See Also:
 
- 
READ_ONLY_HEADERSSpecifies the value ofDefaultMessageBuilderFactory.readOnlyHeaders.- See Also:
 
- 
ENDPOINTS_NO_AUTO_STARTUPSpecifies the value ofAbstractEndpoint.autoStartup.- See Also:
 
- 
ENDPOINTS_DEFAULT_TIMEOUTSpecifies the default timeout for blocking operations like send and receive messages.- Since:
- 6.2
- See Also:
 
 
- 
- 
Constructor Details- 
IntegrationPropertiespublic IntegrationProperties()
 
- 
- 
Method Details- 
setChannelsAutoCreatepublic void setChannelsAutoCreate(boolean channelsAutoCreate) Configure a value forCHANNELS_AUTOCREATEoption.- Parameters:
- channelsAutoCreate- the value for- CHANNELS_AUTOCREATEoption.
 
- 
isChannelsAutoCreatepublic boolean isChannelsAutoCreate()Return the value ofCHANNELS_AUTOCREATEoption.- Returns:
- the value of CHANNELS_AUTOCREATEoption.
 
- 
setChannelsMaxUnicastSubscriberspublic void setChannelsMaxUnicastSubscribers(int channelsMaxUnicastSubscribers) Configure a value forCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.- Parameters:
- channelsMaxUnicastSubscribers- the value for- CHANNELS_MAX_UNICAST_SUBSCRIBERSoption.
 
- 
getChannelsMaxUnicastSubscriberspublic int getChannelsMaxUnicastSubscribers()Return the value ofCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.- Returns:
- the value of CHANNELS_MAX_UNICAST_SUBSCRIBERSoption.
 
- 
setChannelsMaxBroadcastSubscriberspublic void setChannelsMaxBroadcastSubscribers(int channelsMaxBroadcastSubscribers) Configure a value forCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.- Parameters:
- channelsMaxBroadcastSubscribers- the value for- CHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.
 
- 
getChannelsMaxBroadcastSubscriberspublic int getChannelsMaxBroadcastSubscribers()Return the value ofCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.- Returns:
- the value of CHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.
 
- 
setErrorChannelRequireSubscriberspublic void setErrorChannelRequireSubscribers(boolean errorChannelRequireSubscribers) Configure a value forERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.- Parameters:
- errorChannelRequireSubscribers- the value for- ERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.
 
- 
isErrorChannelRequireSubscriberspublic boolean isErrorChannelRequireSubscribers()Return the value ofERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.- Returns:
- the value of ERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.
 
- 
setErrorChannelIgnoreFailurespublic void setErrorChannelIgnoreFailures(boolean errorChannelIgnoreFailures) Configure a value forERROR_CHANNEL_IGNORE_FAILURESoption.- Parameters:
- errorChannelIgnoreFailures- the value for- ERROR_CHANNEL_IGNORE_FAILURESoption.
 
- 
isErrorChannelIgnoreFailurespublic boolean isErrorChannelIgnoreFailures()Return the value ofERROR_CHANNEL_IGNORE_FAILURESoption.- Returns:
- the value of ERROR_CHANNEL_IGNORE_FAILURESoption.
 
- 
setTaskSchedulerPoolSizepublic void setTaskSchedulerPoolSize(int taskSchedulerPoolSize) Configure a value forTASK_SCHEDULER_POOL_SIZEoption.- Parameters:
- taskSchedulerPoolSize- the value for- TASK_SCHEDULER_POOL_SIZEoption.
 
- 
getTaskSchedulerPoolSizepublic int getTaskSchedulerPoolSize()Return the value ofTASK_SCHEDULER_POOL_SIZEoption.- Returns:
- the value of TASK_SCHEDULER_POOL_SIZEoption.
 
- 
setMessagingTemplateThrowExceptionOnLateReplypublic void setMessagingTemplateThrowExceptionOnLateReply(boolean messagingTemplateThrowExceptionOnLateReply) Configure a value forTHROW_EXCEPTION_ON_LATE_REPLYoption.- Parameters:
- messagingTemplateThrowExceptionOnLateReply- the value for- THROW_EXCEPTION_ON_LATE_REPLYoption.
 
- 
isMessagingTemplateThrowExceptionOnLateReplypublic boolean isMessagingTemplateThrowExceptionOnLateReply()Return the value ofTHROW_EXCEPTION_ON_LATE_REPLYoption.- Returns:
- the value of THROW_EXCEPTION_ON_LATE_REPLYoption.
 
- 
setReadOnlyHeadersConfigure a value forREAD_ONLY_HEADERSoption.- Parameters:
- readOnlyHeaders- the value for- READ_ONLY_HEADERSoption.
 
- 
getReadOnlyHeadersReturn the value ofREAD_ONLY_HEADERSoption.- Returns:
- the value of READ_ONLY_HEADERSoption.
 
- 
setNoAutoStartupEndpointsConfigure a value forENDPOINTS_NO_AUTO_STARTUPoption.- Parameters:
- noAutoStartupEndpoints- the value for- ENDPOINTS_NO_AUTO_STARTUPoption.
 
- 
getNoAutoStartupEndpointsReturn the value ofENDPOINTS_NO_AUTO_STARTUPoption.- Returns:
- the value of ENDPOINTS_NO_AUTO_STARTUPoption.
 
- 
getEndpointsDefaultTimeoutpublic long getEndpointsDefaultTimeout()Return the value ofENDPOINTS_DEFAULT_TIMEOUToption.- Returns:
- the value of ENDPOINTS_DEFAULT_TIMEOUToption.
- Since:
- 6.2
 
- 
setEndpointsDefaultTimeoutpublic void setEndpointsDefaultTimeout(long endpointsDefaultTimeout) Configure a value forENDPOINTS_DEFAULT_TIMEOUToption.- Parameters:
- endpointsDefaultTimeout- the value for- ENDPOINTS_DEFAULT_TIMEOUToption.
 
- 
toPropertiesRepresent the current instance as aProperties.- Returns:
- the Propertiesrepresentation.
- Since:
- 5.5
 
- 
parseParse a providedPropertiesand build anIntegrationPropertiesinstance.- Parameters:
- properties- the- Propertiesto parse entries for- IntegrationProperties.
- Returns:
- IntegrationPropertiesbased on the provided- Properties.
- Since:
- 5.5
 
- 
defaults- Returns:
- Propertieswith default values for Integration properties.
 
- 
getExpressionForBuild the bean property definition expression to resolve the value from Integration properties within the bean building phase.- Parameters:
- key- the Integration property key.
- Returns:
- the bean property definition expression.
- Throws:
- IllegalArgumentException- if provided- keyisn't an Integration property.
 
 
-