public class RotatingServerAdvice
extends org.springframework.integration.aop.AbstractMessageSourceAdvice
| Constructor and Description |
|---|
RotatingServerAdvice(DelegatingSessionFactory<?> factory,
java.util.List<RotationPolicy.KeyDirectory> keyDirectories)
Create an instance that rotates to the next server/directory if no message is
received.
|
RotatingServerAdvice(DelegatingSessionFactory<?> factory,
java.util.List<RotationPolicy.KeyDirectory> keyDirectories,
boolean fair)
Create an instance that rotates to the next server/directory depending on the fair
argument.
|
RotatingServerAdvice(RotationPolicy rotationPolicy)
Construct an instance that rotates according to the supplied
RotationPolicy. |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.Message<?> |
afterReceive(org.springframework.messaging.Message<?> result,
org.springframework.integration.core.MessageSource<?> source) |
boolean |
beforeReceive(org.springframework.integration.core.MessageSource<?> source) |
public RotatingServerAdvice(DelegatingSessionFactory<?> factory, java.util.List<RotationPolicy.KeyDirectory> keyDirectories)
factory - the DelegatingSessionFactory.keyDirectories - a list of RotationPolicy.KeyDirectory.public RotatingServerAdvice(DelegatingSessionFactory<?> factory, java.util.List<RotationPolicy.KeyDirectory> keyDirectories, boolean fair)
factory - the DelegatingSessionFactory.keyDirectories - a list of RotationPolicy.KeyDirectory.fair - true to rotate on every poll, false to rotate when no message is received.public RotatingServerAdvice(RotationPolicy rotationPolicy)
RotationPolicy.rotationPolicy - the policy.public boolean beforeReceive(org.springframework.integration.core.MessageSource<?> source)
public org.springframework.messaging.Message<?> afterReceive(org.springframework.messaging.Message<?> result,
org.springframework.integration.core.MessageSource<?> source)