diff --git a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/aop/RotatingServerAdvice.java b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/aop/RotatingServerAdvice.java index 24af3e40f8..1b3f0d6aa1 100644 --- a/spring-integration-file/src/main/java/org/springframework/integration/file/remote/aop/RotatingServerAdvice.java +++ b/spring-integration-file/src/main/java/org/springframework/integration/file/remote/aop/RotatingServerAdvice.java @@ -35,6 +35,7 @@ import org.springframework.util.Assert; * A smart poller advice that rotates across multiple remote servers/directories. * * @author Gary Russell + * @author Michael Forstner * * @since 5.0.7 * @@ -196,9 +197,9 @@ public class RotatingServerAdvice extends AbstractMessageSourceAdvice { protected void configureSource(MessageSource source) { Assert.isTrue(source instanceof AbstractInboundFileSynchronizingMessageSource - || source instanceof AbstractRemoteFileStreamingMessageSource, - "source must be an AbstractInboundFileSynchronizingMessageSource or a " - + "AbstractRemoteFileStreamingMessageSource"); + || source instanceof AbstractRemoteFileStreamingMessageSource, + "source must be an AbstractInboundFileSynchronizingMessageSource or a " + + "AbstractRemoteFileStreamingMessageSource"); if (!this.iterator.hasNext()) { this.iterator = this.keyDirectories.iterator(); } @@ -208,7 +209,7 @@ public class RotatingServerAdvice extends AbstractMessageSourceAdvice { } else { ((AbstractInboundFileSynchronizingMessageSource) source).getSynchronizer() - .setRemoteDirectory(this.current.getDirectory()); + .setRemoteDirectory(this.current.getDirectory()); } } @@ -219,18 +220,18 @@ public class RotatingServerAdvice extends AbstractMessageSourceAdvice { */ public static class KeyDirectory { - private final String key; + private final Object key; private final String directory; - public KeyDirectory(String key, String directory) { + public KeyDirectory(Object key, String directory) { Assert.notNull(key, "key cannot be null"); Assert.notNull(directory, "directory cannot be null"); this.key = key; this.directory = directory; } - public String getKey() { + public Object getKey() { return this.key; } @@ -240,7 +241,7 @@ public class RotatingServerAdvice extends AbstractMessageSourceAdvice { @Override public String toString() { - return "KeyDirectory [key=" + this.key + ", directory=" + this.directory + "]"; + return "KeyDirectory [key=" + this.key.toString() + ", directory=" + this.directory + "]"; } } diff --git a/src/reference/asciidoc/ftp.adoc b/src/reference/asciidoc/ftp.adoc index 15ee2634f0..51890dfc0b 100644 --- a/src/reference/asciidoc/ftp.adoc +++ b/src/reference/asciidoc/ftp.adoc @@ -224,7 +224,7 @@ Convenience methods have been added so this can easily be done from a message fl IMPORTANT: When using session caching (see <>), each of the delegates should be cached; you cannot cache the `DelegatingSessionFactory` itself. -Starting with _version 5.0.7_, the `DelegatingSessionFactory` can be used in conjuction with a `RotatingServerAdvice` to poll multiple servers; see <>. +Starting with _version 5.0.7_, the `DelegatingSessionFactory` can be used in conjunction with a `RotatingServerAdvice` to poll multiple servers; see <>. [[ftp-inbound]] === FTP Inbound Channel Adapter diff --git a/src/reference/asciidoc/sftp.adoc b/src/reference/asciidoc/sftp.adoc index 47b803686b..be3020f210 100644 --- a/src/reference/asciidoc/sftp.adoc +++ b/src/reference/asciidoc/sftp.adoc @@ -239,7 +239,7 @@ Convenience methods have been added so this can easily be done from a message fl IMPORTANT: When using session caching (see <>), each of the delegates should be cached; you cannot cache the `DelegatingSessionFactory` itself. -Starting with _version 5.0.7_, the `DelegatingSessionFactory` can be used in conjuction with a `RotatingServerAdvice` to poll multiple servers; see <>. +Starting with _version 5.0.7_, the `DelegatingSessionFactory` can be used in conjunction with a `RotatingServerAdvice` to poll multiple servers; see <>. [[sftp-session-caching]] === SFTP Session Caching