public class SimpleActiveIdleMessageSourceAdvice extends AbstractMessageSourceAdvice
DynamicPeriodicTrigger| Constructor and Description |
|---|
SimpleActiveIdleMessageSourceAdvice(DynamicPeriodicTrigger trigger) |
| Modifier and Type | Method and Description |
|---|---|
Message<?> |
afterReceive(Message<?> result,
MessageSource<?> source)
Subclasses can take actions based on the result of the poll; e.g.
|
void |
setActivePollPeriod(long activePollPeriod)
Set the poll period when messages are returned.
|
void |
setIdlePollPeriod(long idlePollPeriod)
Set the poll period when messages are not returned.
|
invokeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeReceivepublic SimpleActiveIdleMessageSourceAdvice(DynamicPeriodicTrigger trigger)
public void setIdlePollPeriod(long idlePollPeriod)
idlePollPeriod - the period in milliseconds.public void setActivePollPeriod(long activePollPeriod)
activePollPeriod - the period in milliseconds.public Message<?> afterReceive(Message<?> result, MessageSource<?> source)
MessageSourceMutatortrigger. The message can also be replaced with a new one.result - the received message.source - the message source.