Class FtpStreamingMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource<java.io.InputStream>
org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.commons.net.ftp.FTPFile>
org.springframework.integration.ftp.inbound.FtpStreamingMessageSource
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.Lifecycle,org.springframework.integration.core.MessageSource<java.io.InputStream>,org.springframework.integration.IntegrationPattern,org.springframework.integration.support.context.NamedComponent,org.springframework.integration.support.management.IntegrationInboundManagement,org.springframework.integration.support.management.IntegrationManagement,org.springframework.integration.support.management.ManageableLifecycle,org.springframework.integration.support.management.MessageSourceManagement
public class FtpStreamingMessageSource
extends org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.commons.net.ftp.FTPFile>
Message source for streaming FTP remote file contents.
- Since:
- 4.3
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description FtpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> template)Construct an instance with the supplied template.FtpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> template, java.util.Comparator<org.apache.commons.net.ftp.FTPFile> comparator)Construct an instance with the supplied template and comparator. -
Method Summary
Modifier and Type Method Description protected java.util.List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>>asFileInfoList(java.util.Collection<org.apache.commons.net.ftp.FTPFile> files)java.lang.StringgetComponentType()protected booleanisDirectory(org.apache.commons.net.ftp.FTPFile file)Methods inherited from class org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource
doInit, doReceive, doSetFilter, getRemoteFileTemplate, isRunning, onInit, poll, remotePath, rollbackFromFileToListEnd, setFileInfoJson, setFilter, setRemoteDirectory, setRemoteDirectoryExpression, setRemoteFileSeparator, start, stopMethods inherited from class org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource
doReceive, getMaxFetchSize, setMaxFetchSizeMethods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FtpStreamingMessageSource
public FtpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> template)Construct an instance with the supplied template.- Parameters:
template- the template.
-
FtpStreamingMessageSource
public FtpStreamingMessageSource(org.springframework.integration.file.remote.RemoteFileTemplate<org.apache.commons.net.ftp.FTPFile> template, java.util.Comparator<org.apache.commons.net.ftp.FTPFile> comparator)Construct an instance with the supplied template and comparator. Note: the comparator is applied each time the remote directory is listed which only occurs when the previous list is exhausted.- Parameters:
template- the template.comparator- the comparator.
-
-
Method Details
-
getComponentType
public java.lang.String getComponentType() -
asFileInfoList
protected java.util.List<org.springframework.integration.file.remote.AbstractFileInfo<org.apache.commons.net.ftp.FTPFile>> asFileInfoList(java.util.Collection<org.apache.commons.net.ftp.FTPFile> files)- Specified by:
asFileInfoListin classorg.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.commons.net.ftp.FTPFile>
-
isDirectory
protected boolean isDirectory(org.apache.commons.net.ftp.FTPFile file)- Specified by:
isDirectoryin classorg.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<org.apache.commons.net.ftp.FTPFile>
-