public class DelayerEndpointSpec extends ConsumerEndpointSpec<DelayerEndpointSpec,DelayHandler>
ConsumerEndpointSpec for a DelayHandler.adviceChaincomponentsToRegister, endpointFactoryBean, handlerPARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
DelayerEndpointSpec(DelayHandler delayHandler) |
| Modifier and Type | Method and Description |
|---|---|
DelayerEndpointSpec |
defaultDelay(long defaultDelay) |
DelayerEndpointSpec |
delayedAdvice(Advice... advice)
Configure a list of
Advice objects that will be applied, in nested order,
when delayed messages are sent. |
DelayerEndpointSpec |
delayedMessageErrorChannel(MessageChannel channel)
Set a message channel to which an
ErrorMessage will be sent if sending the
released message fails. |
DelayerEndpointSpec |
delayedMessageErrorChannel(String channel)
Set a message channel name to which an
ErrorMessage will be sent if sending
the released message fails. |
DelayerEndpointSpec |
delayExpression(Expression delayExpression) |
DelayerEndpointSpec |
delayExpression(String delayExpression) |
<P> DelayerEndpointSpec |
delayFunction(java.util.function.Function<Message<P>,Object> delayFunction)
Specify the function to determine delay value against
Message. |
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 a
TransactionInterceptor Advice with default
TransactionManager and
DefaultTransactionAttribute for
the
MessageHandler. |
DelayerEndpointSpec |
transactionalRelease(TransactionInterceptor transactionInterceptor)
|
DelayerEndpointSpec |
transactionalRelease(TransactionManager transactionManager)
Specify a
TransactionInterceptor Advice with the provided
TransactionManager and default
DefaultTransactionAttribute
for the MessageHandler. |
advice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, requiresReply, role, sendTimeout, taskScheduler, transactional, transactional, transactional, transactional, transactionalassertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected DelayerEndpointSpec(DelayHandler delayHandler)
public DelayerEndpointSpec defaultDelay(long defaultDelay)
defaultDelay - the defaultDelay.DelayHandler.setDefaultDelay(long)public DelayerEndpointSpec ignoreExpressionFailures(boolean ignoreExpressionFailures)
ignoreExpressionFailures - the ignoreExpressionFailures.DelayHandler.setIgnoreExpressionFailures(boolean)public DelayerEndpointSpec messageStore(MessageGroupStore messageStore)
messageStore - the message store.public DelayerEndpointSpec delayedAdvice(Advice... advice)
Advice objects that will be applied, in nested order,
when delayed messages are sent.advice - the advice chain.public DelayerEndpointSpec delayExpression(Expression delayExpression)
public DelayerEndpointSpec delayExpression(String delayExpression)
public DelayerEndpointSpec delayedMessageErrorChannel(MessageChannel channel)
ErrorMessage 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.channel - the channel.maxAttempts(int),
retryDelay(long)public DelayerEndpointSpec delayedMessageErrorChannel(String channel)
ErrorMessage 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.channel - the channel name.maxAttempts(int),
retryDelay(long)public DelayerEndpointSpec maxAttempts(int maxAttempts)
maxAttempts - the max attempts.retryDelay(long)public DelayerEndpointSpec retryDelay(long retryDelay)
retryDelay - the retry delay.maxAttempts(int)public DelayerEndpointSpec transactionalRelease()
TransactionInterceptor Advice with default
TransactionManager and
DefaultTransactionAttribute for
the
MessageHandler.public DelayerEndpointSpec transactionalRelease(TransactionInterceptor transactionInterceptor)
transactionInterceptor - the TransactionInterceptor to use.TransactionInterceptorBuilderpublic DelayerEndpointSpec transactionalRelease(TransactionManager transactionManager)
TransactionInterceptor Advice with the provided
TransactionManager and default
DefaultTransactionAttribute
for the MessageHandler.transactionManager - the TransactionManager to use.public <P> DelayerEndpointSpec delayFunction(java.util.function.Function<Message<P>,Object> delayFunction)
Message.
Typically used with a Java 8 Lambda expression:
.<Foo>delay("delayer", m -> m.getPayload().getDate(),
c -> c.advice(this.delayedAdvice).messageStore(this.messageStore()))
P - the payload type.delayFunction - the Function to determine delay.