Class DelayerEndpointSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
org.springframework.integration.dsl.ConsumerEndpointSpec<DelayerEndpointSpec,DelayHandler>
org.springframework.integration.dsl.DelayerEndpointSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,DelayHandler>>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpec,DelayHandler>
A
ConsumerEndpointSpec
for a DelayHandler
.- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
DelayerEndpointSpec(DelayHandler delayHandler)
-
Method Summary
Modifier and Type Method Description DelayerEndpointSpec
defaultDelay(long defaultDelay)
DelayerEndpointSpec
delayedAdvice(Advice... advice)
Configure a list ofAdvice
objects that will be applied, in nested order, when delayed messages are sent.DelayerEndpointSpec
delayedMessageErrorChannel(String channel)
Set a message channel name to which anErrorMessage
will be sent if sending the released message fails.DelayerEndpointSpec
delayedMessageErrorChannel(MessageChannel channel)
Set a message channel to which anErrorMessage
will be sent if sending the released message fails.DelayerEndpointSpec
delayExpression(String delayExpression)
DelayerEndpointSpec
delayExpression(Expression delayExpression)
<P> DelayerEndpointSpec
delayFunction(Function<Message<P>,Object> delayFunction)
Specify the function to determine delay value againstMessage
.DelayerEndpointSpec
ignoreExpressionFailures(boolean ignoreExpressionFailures)
DelayerEndpointSpec
maxAttempts(int maxAttempts)
Set the maximum number of release attempts for when message release fails.DelayerEndpointSpec
messageStore(MessageGroupStore messageStore)
DelayerEndpointSpec
retryDelay(long retryDelay)
Set an additional delay to apply when retrying after a release failure.DelayerEndpointSpec
transactionalRelease()
Specify aTransactionInterceptor
Advice
with defaultTransactionManager
andDefaultTransactionAttribute
for theMessageHandler
.DelayerEndpointSpec
transactionalRelease(TransactionInterceptor transactionInterceptor)
DelayerEndpointSpec
transactionalRelease(TransactionManager transactionManager)
Specify aTransactionInterceptor
Advice
with the providedTransactionManager
and defaultDefaultTransactionAttribute
for theMessageHandler
.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
Method Details
-
defaultDelay
- Parameters:
defaultDelay
- the defaultDelay.- Returns:
- the endpoint spec.
- See Also:
DelayHandler.setDefaultDelay(long)
-
ignoreExpressionFailures
- Parameters:
ignoreExpressionFailures
- the ignoreExpressionFailures.- Returns:
- the endpoint spec.
- See Also:
DelayHandler.setIgnoreExpressionFailures(boolean)
-
messageStore
- Parameters:
messageStore
- the message store.- Returns:
- the endpoint spec.
-
delayedAdvice
Configure a list ofAdvice
objects that will be applied, in nested order, when delayed messages are sent.- Parameters:
advice
- the advice chain.- Returns:
- the endpoint spec.
-
delayExpression
-
delayExpression
-
delayedMessageErrorChannel
Set a message channel to which anErrorMessage
will be sent if sending the released message fails. If the error flow returns normally, the release is complete. If the error flow throws an exception, the release will be re-attempted. If there is a transaction advice on the release task, the error flow is called within the transaction.- Parameters:
channel
- the channel.- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
maxAttempts(int)
,retryDelay(long)
-
delayedMessageErrorChannel
Set a message channel name to which anErrorMessage
will be sent if sending the released message fails. If the error flow returns normally, the release is complete. If the error flow throws an exception, the release will be re-attempted. If there is a transaction advice on the release task, the error flow is called within the transaction.- Parameters:
channel
- the channel name.- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
maxAttempts(int)
,retryDelay(long)
-
maxAttempts
Set the maximum number of release attempts for when message release fails. Default 5.- Parameters:
maxAttempts
- the max attempts.- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
retryDelay(long)
-
retryDelay
Set an additional delay to apply when retrying after a release failure. Default 1000L.- Parameters:
retryDelay
- the retry delay.- Returns:
- the endpoint spec.
- Since:
- 5.0.8
- See Also:
maxAttempts(int)
-
transactionalRelease
Specify aTransactionInterceptor
Advice
with defaultTransactionManager
andDefaultTransactionAttribute
for theMessageHandler
.- Returns:
- the spec.
- Since:
- 5.0.8
-
transactionalRelease
- Parameters:
transactionInterceptor
- theTransactionInterceptor
to use.- Returns:
- the spec.
- Since:
- 5.0.8
- See Also:
TransactionInterceptorBuilder
-
transactionalRelease
Specify aTransactionInterceptor
Advice
with the providedTransactionManager
and defaultDefaultTransactionAttribute
for theMessageHandler
.- Parameters:
transactionManager
- theTransactionManager
to use.- Returns:
- the spec.
- Since:
- 5.2.5
-
delayFunction
Specify the function to determine delay value againstMessage
. Typically used with a Java 8 Lambda expression:.<Foo>delay("delayer", m -> m.getPayload().getDate(), c -> c.advice(this.delayedAdvice).messageStore(this.messageStore()))
- Type Parameters:
P
- the payload type.- Parameters:
delayFunction
- theFunction
to determine delay.- Returns:
- the endpoint spec.
-