public class RotatingServerAdvice
extends java.lang.Object
implements org.springframework.integration.aop.MessageSourceMutator
| 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic 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)
beforeReceive in interface org.springframework.integration.aop.MessageSourceMutator@Nullable
public org.springframework.messaging.Message<?> afterReceive(@Nullable
org.springframework.messaging.Message<?> result,
org.springframework.integration.core.MessageSource<?> source)
afterReceive in interface org.springframework.integration.aop.MessageSourceMutator