Class SimpleActiveIdleReceiveMessageAdvice
java.lang.Object
org.springframework.integration.aop.SimpleActiveIdleReceiveMessageAdvice
- All Implemented Interfaces:
- Advice,- Interceptor,- MethodInterceptor,- ReceiveMessageAdvice
A simple advice that polls at one rate when messages exist and another when
 there are no messages.
- Since:
- 5.3
- Author:
- Gary Russell, Artem Bilan
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionMessage<?> afterReceive(Message<?> result, Object source) Subclasses can take actions based on the result of theJoinpoint.proceed(); e.g.voidsetActivePollPeriod(long activePollPeriod) Set the poll period when messages are returned.voidsetIdlePollPeriod(long idlePollPeriod) Set the poll period when messages are not returned.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.aop.ReceiveMessageAdvicebeforeReceive, invoke
- 
Constructor Details- 
SimpleActiveIdleReceiveMessageAdvice
 
- 
- 
Method Details- 
setIdlePollPeriodpublic void setIdlePollPeriod(long idlePollPeriod) Set the poll period when messages are not returned. Defaults to the trigger's period.- Parameters:
- idlePollPeriod- the period in milliseconds.
 
- 
setActivePollPeriodpublic void setActivePollPeriod(long activePollPeriod) Set the poll period when messages are returned. Defaults to the trigger's period.- Parameters:
- activePollPeriod- the period in milliseconds.
 
- 
afterReceiveDescription copied from interface:ReceiveMessageAdviceSubclasses can take actions based on the result of theJoinpoint.proceed(); e.g. adjust thetrigger. The message can also be replaced with a new one.- Specified by:
- afterReceivein interface- ReceiveMessageAdvice
- Parameters:
- result- the received message.
- source- the source of the message to receive.
- Returns:
- a message to continue to process the result, null to discard whatever
 the Joinpoint.proceed()returned.
 
 
-