public class StandardRotationPolicy extends java.lang.Object implements RotationPolicy
onRotation(MessageSource<?> source) to configure the
MessageSource on each rotation.RotationPolicy.KeyDirectory| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
StandardRotationPolicy(DelegatingSessionFactory<?> factory,
java.util.List<RotationPolicy.KeyDirectory> keyDirectories,
boolean fair) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterReceive(boolean messageReceived,
org.springframework.integration.core.MessageSource<?> source)
Invoked after the message source receive() method.
|
void |
beforeReceive(org.springframework.integration.core.MessageSource<?> source)
Invoked before the message source receive() method.
|
protected void |
configureSource(org.springframework.integration.core.MessageSource<?> source) |
RotationPolicy.KeyDirectory |
getCurrent()
Return the current
RotationPolicy.KeyDirectory. |
protected DelegatingSessionFactory<?> |
getFactory() |
protected java.util.Iterator<RotationPolicy.KeyDirectory> |
getIterator() |
protected java.util.List<RotationPolicy.KeyDirectory> |
getKeyDirectories() |
protected boolean |
isFair() |
protected boolean |
isInitialized() |
protected void |
onRotation(org.springframework.integration.core.MessageSource<?> source)
Update the state of the
MessageSource after the server is rotated, if necessary. |
public StandardRotationPolicy(DelegatingSessionFactory<?> factory, java.util.List<RotationPolicy.KeyDirectory> keyDirectories, boolean fair)
public void beforeReceive(org.springframework.integration.core.MessageSource<?> source)
RotationPolicybeforeReceive in interface RotationPolicysource - the message source.public void afterReceive(boolean messageReceived,
org.springframework.integration.core.MessageSource<?> source)
RotationPolicyafterReceive in interface RotationPolicymessageReceived - true if a message was received.source - the message source.public RotationPolicy.KeyDirectory getCurrent()
RotationPolicyRotationPolicy.KeyDirectory.getCurrent in interface RotationPolicyRotationPolicy.KeyDirectoryprotected DelegatingSessionFactory<?> getFactory()
protected java.util.List<RotationPolicy.KeyDirectory> getKeyDirectories()
protected boolean isFair()
protected java.util.Iterator<RotationPolicy.KeyDirectory> getIterator()
protected boolean isInitialized()
protected void configureSource(org.springframework.integration.core.MessageSource<?> source)
protected void onRotation(org.springframework.integration.core.MessageSource<?> source)
MessageSource after the server is rotated, if necessary.
The default implementation updates the remote directory for known MessageSource implementations that require it,
specifically, instances of AbstractRemoteFileStreamingMessageSource, and
AbstractInboundFileSynchronizingMessageSource, and does nothing otherwise.
Subclasses may override this method to support other MessageSource types.source - the MessageSource.