public class SimpleActiveIdleReceiveMessageAdvice extends Object implements ReceiveMessageAdvice
DynamicPeriodicTrigger| Constructor and Description |
|---|
SimpleActiveIdleReceiveMessageAdvice(DynamicPeriodicTrigger trigger) |
| Modifier and Type | Method and Description |
|---|---|
Message<?> |
afterReceive(Message<?> result,
Object source)
Subclasses can take actions based on the result of the
Joinpoint.proceed(); 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeReceive, invokepublic SimpleActiveIdleReceiveMessageAdvice(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, Object source)
ReceiveMessageAdviceJoinpoint.proceed(); e.g.
adjust the trigger. The message can also be replaced with a new one.afterReceive in interface ReceiveMessageAdviceresult - the received message.source - the source of the message to receive.Joinpoint.proceed() returned.