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 Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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_INSTANCE
A singleton with default values. -
INTEGRATION_PROPERTIES_PREFIX
- See Also:
-
CHANNELS_AUTOCREATE
Specifies whether to allow create automaticallyDirectChannelbeans for non-declared channels or not.- See Also:
-
CHANNELS_MAX_UNICAST_SUBSCRIBERS
Specifies 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_SUBSCRIBERS
Specifies 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_SUBSCRIBERS
Specifies the value forPublishSubscribeChannel.requireSubscriberson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.- See Also:
-
ERROR_CHANNEL_IGNORE_FAILURES
Specifies the value forPublishSubscribeChannel.ignoreFailureson a global defaultIntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME.- See Also:
-
TASK_SCHEDULER_POOL_SIZE
Specifies the value ofThreadPoolTaskScheduler.poolSizefor thetaskSchedulerbean initialized by the Integration infrastructure.- See Also:
-
THROW_EXCEPTION_ON_LATE_REPLY
Specifies the value ofGenericMessagingTemplate.throwExceptionOnLateReply.- See Also:
-
READ_ONLY_HEADERS
Specifies the value ofDefaultMessageBuilderFactory.readOnlyHeaders.- See Also:
-
ENDPOINTS_NO_AUTO_STARTUP
Specifies the value ofAbstractEndpoint.autoStartup.- See Also:
-
ENDPOINTS_DEFAULT_TIMEOUT
Specifies the default timeout for blocking operations like send and receive messages.- Since:
- 6.2
- See Also:
-
-
Constructor Details
-
IntegrationProperties
public IntegrationProperties()
-
-
Method Details
-
setChannelsAutoCreate
public void setChannelsAutoCreate(boolean channelsAutoCreate) Configure a value forCHANNELS_AUTOCREATEoption.- Parameters:
channelsAutoCreate- the value forCHANNELS_AUTOCREATEoption.
-
isChannelsAutoCreate
public boolean isChannelsAutoCreate()Return the value ofCHANNELS_AUTOCREATEoption.- Returns:
- the value of
CHANNELS_AUTOCREATEoption.
-
setChannelsMaxUnicastSubscribers
public void setChannelsMaxUnicastSubscribers(int channelsMaxUnicastSubscribers) Configure a value forCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.- Parameters:
channelsMaxUnicastSubscribers- the value forCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.
-
getChannelsMaxUnicastSubscribers
public int getChannelsMaxUnicastSubscribers()Return the value ofCHANNELS_MAX_UNICAST_SUBSCRIBERSoption.- Returns:
- the value of
CHANNELS_MAX_UNICAST_SUBSCRIBERSoption.
-
setChannelsMaxBroadcastSubscribers
public void setChannelsMaxBroadcastSubscribers(int channelsMaxBroadcastSubscribers) Configure a value forCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.- Parameters:
channelsMaxBroadcastSubscribers- the value forCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.
-
getChannelsMaxBroadcastSubscribers
public int getChannelsMaxBroadcastSubscribers()Return the value ofCHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.- Returns:
- the value of
CHANNELS_MAX_BROADCAST_SUBSCRIBERSoption.
-
setErrorChannelRequireSubscribers
public void setErrorChannelRequireSubscribers(boolean errorChannelRequireSubscribers) Configure a value forERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.- Parameters:
errorChannelRequireSubscribers- the value forERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.
-
isErrorChannelRequireSubscribers
public boolean isErrorChannelRequireSubscribers()Return the value ofERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.- Returns:
- the value of
ERROR_CHANNEL_REQUIRE_SUBSCRIBERSoption.
-
setErrorChannelIgnoreFailures
public void setErrorChannelIgnoreFailures(boolean errorChannelIgnoreFailures) Configure a value forERROR_CHANNEL_IGNORE_FAILURESoption.- Parameters:
errorChannelIgnoreFailures- the value forERROR_CHANNEL_IGNORE_FAILURESoption.
-
isErrorChannelIgnoreFailures
public boolean isErrorChannelIgnoreFailures()Return the value ofERROR_CHANNEL_IGNORE_FAILURESoption.- Returns:
- the value of
ERROR_CHANNEL_IGNORE_FAILURESoption.
-
setTaskSchedulerPoolSize
public void setTaskSchedulerPoolSize(int taskSchedulerPoolSize) Configure a value forTASK_SCHEDULER_POOL_SIZEoption.- Parameters:
taskSchedulerPoolSize- the value forTASK_SCHEDULER_POOL_SIZEoption.
-
getTaskSchedulerPoolSize
public int getTaskSchedulerPoolSize()Return the value ofTASK_SCHEDULER_POOL_SIZEoption.- Returns:
- the value of
TASK_SCHEDULER_POOL_SIZEoption.
-
setMessagingTemplateThrowExceptionOnLateReply
public void setMessagingTemplateThrowExceptionOnLateReply(boolean messagingTemplateThrowExceptionOnLateReply) Configure a value forTHROW_EXCEPTION_ON_LATE_REPLYoption.- Parameters:
messagingTemplateThrowExceptionOnLateReply- the value forTHROW_EXCEPTION_ON_LATE_REPLYoption.
-
isMessagingTemplateThrowExceptionOnLateReply
public boolean isMessagingTemplateThrowExceptionOnLateReply()Return the value ofTHROW_EXCEPTION_ON_LATE_REPLYoption.- Returns:
- the value of
THROW_EXCEPTION_ON_LATE_REPLYoption.
-
setReadOnlyHeaders
Configure a value forREAD_ONLY_HEADERSoption.- Parameters:
readOnlyHeaders- the value forREAD_ONLY_HEADERSoption.
-
getReadOnlyHeaders
Return the value ofREAD_ONLY_HEADERSoption.- Returns:
- the value of
READ_ONLY_HEADERSoption.
-
setNoAutoStartupEndpoints
Configure a value forENDPOINTS_NO_AUTO_STARTUPoption.- Parameters:
noAutoStartupEndpoints- the value forENDPOINTS_NO_AUTO_STARTUPoption.
-
getNoAutoStartupEndpoints
Return the value ofENDPOINTS_NO_AUTO_STARTUPoption.- Returns:
- the value of
ENDPOINTS_NO_AUTO_STARTUPoption.
-
getEndpointsDefaultTimeout
public long getEndpointsDefaultTimeout()Return the value ofENDPOINTS_DEFAULT_TIMEOUToption.- Returns:
- the value of
ENDPOINTS_DEFAULT_TIMEOUToption. - Since:
- 6.2
-
setEndpointsDefaultTimeout
public void setEndpointsDefaultTimeout(long endpointsDefaultTimeout) Configure a value forENDPOINTS_DEFAULT_TIMEOUToption.- Parameters:
endpointsDefaultTimeout- the value forENDPOINTS_DEFAULT_TIMEOUToption.
-
toProperties
Represent the current instance as aProperties.- Returns:
- the
Propertiesrepresentation. - Since:
- 5.5
-
parse
Parse a providedPropertiesand build anIntegrationPropertiesinstance.- Parameters:
properties- thePropertiesto parse entries forIntegrationProperties.- Returns:
IntegrationPropertiesbased on the providedProperties.- Since:
- 5.5
-
defaults
- Returns:
Propertieswith default values for Integration properties.
-
getExpressionFor
Build 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 providedkeyisn't an Integration property.
-