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 15dac62f9e..f83ad8a8e6 100644 --- a/src/reference/asciidoc/ftp.adoc +++ b/src/reference/asciidoc/ftp.adoc @@ -247,7 +247,7 @@ The following example shows how to declare a delegating session factory: IMPORTANT: When you use 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 e35c736078..e75b28d7d0 100644 --- a/src/reference/asciidoc/sftp.adoc +++ b/src/reference/asciidoc/sftp.adoc @@ -210,7 +210,7 @@ We added convenience methods so that you can more easily do so 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