Class StandardRotationPolicy
java.lang.Object
org.springframework.integration.file.remote.aop.StandardRotationPolicy
- All Implemented Interfaces:
- RotationPolicy
Standard rotation policy; iterates over key/directory pairs; when the end is reached,
 starts again at the beginning. If the fair option is true the rotation occurs on every
 poll, regardless of result. Otherwise, rotation occurs when the current pair returns no
 message.
 
 Subclasses implement onRotation(MessageSource<?> source) to configure the
 MessageSource on each rotation.
- Since:
- 5.2
- Author:
- Gary Russell, Michael Forstner, Artem Bilan, David Turanski
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.springframework.integration.file.remote.aop.RotationPolicyRotationPolicy.KeyDirectory
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionStandardRotationPolicy(DelegatingSessionFactory<?> factory, List<RotationPolicy.KeyDirectory> keyDirectories, boolean fair) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidafterReceive(boolean messageReceived, MessageSource<?> source) Invoked after the message source receive() method.voidbeforeReceive(MessageSource<?> source) Invoked before the message source receive() method.protected voidconfigureSource(MessageSource<?> source) Return the currentRotationPolicy.KeyDirectory.protected DelegatingSessionFactory<?> protected Iterator<RotationPolicy.KeyDirectory> protected List<RotationPolicy.KeyDirectory> protected booleanisFair()protected booleanprotected voidonRotation(MessageSource<?> source) Update the state of theMessageSourceafter the server is rotated, if necessary.
- 
Field Details- 
logger
 
- 
- 
Constructor Details- 
StandardRotationPolicypublic StandardRotationPolicy(DelegatingSessionFactory<?> factory, List<RotationPolicy.KeyDirectory> keyDirectories, boolean fair) 
 
- 
- 
Method Details- 
beforeReceiveDescription copied from interface:RotationPolicyInvoked before the message source receive() method.- Specified by:
- beforeReceivein interface- RotationPolicy
- Parameters:
- source- the message source.
 
- 
afterReceiveDescription copied from interface:RotationPolicyInvoked after the message source receive() method.- Specified by:
- afterReceivein interface- RotationPolicy
- Parameters:
- messageReceived- true if a message was received.
- source- the message source.
 
- 
getCurrentDescription copied from interface:RotationPolicyReturn the currentRotationPolicy.KeyDirectory.- Specified by:
- getCurrentin interface- RotationPolicy
- Returns:
- the current RotationPolicy.KeyDirectory
 
- 
getFactory
- 
getKeyDirectories
- 
isFairprotected boolean isFair()
- 
getIterator
- 
isInitializedprotected boolean isInitialized()
- 
configureSource
- 
onRotationUpdate the state of theMessageSourceafter the server is rotated, if necessary. The default implementation updates the remote directory for known MessageSource implementations that require it, specifically, instances ofAbstractRemoteFileStreamingMessageSource, andAbstractInboundFileSynchronizingMessageSource, and does nothing otherwise. Subclasses may override this method to support other MessageSource types.- Parameters:
- source- the MessageSource.
 
 
-