Class SftpStreamingMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<T>
org.springframework.integration.endpoint.AbstractFetchLimitingMessageSource<InputStream>
org.springframework.integration.file.remote.AbstractRemoteFileStreamingMessageSource<com.jcraft.jsch.ChannelSftp.LsEntry>
org.springframework.integration.sftp.inbound.SftpStreamingMessageSource
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,Lifecycle,MessageSource<InputStream>,IntegrationPattern,NamedComponent,IntegrationInboundManagement,IntegrationManagement,ManageableLifecycle,MessageSourceManagement
public class SftpStreamingMessageSource extends AbstractRemoteFileStreamingMessageSource<com.jcraft.jsch.ChannelSftp.LsEntry>
Message source for streaming SFTP remote file contents.
- Since:
- 4.3
- Author:
- Gary Russell, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
Constructors Constructor Description SftpStreamingMessageSource(RemoteFileTemplate<com.jcraft.jsch.ChannelSftp.LsEntry> template)Construct an instance with the supplied template.SftpStreamingMessageSource(RemoteFileTemplate<com.jcraft.jsch.ChannelSftp.LsEntry> template, Comparator<com.jcraft.jsch.ChannelSftp.LsEntry> comparator)Construct an instance with the supplied template and comparator. -
Method Summary
Modifier and Type Method Description protected List<AbstractFileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>>asFileInfoList(Collection<com.jcraft.jsch.ChannelSftp.LsEntry> files)StringgetComponentType()protected booleanisDirectory(com.jcraft.jsch.ChannelSftp.LsEntry 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, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.core.MessageSource
getIntegrationPatternType
-
Constructor Details
-
SftpStreamingMessageSource
public SftpStreamingMessageSource(RemoteFileTemplate<com.jcraft.jsch.ChannelSftp.LsEntry> template)Construct an instance with the supplied template.- Parameters:
template- the template.
-
SftpStreamingMessageSource
public SftpStreamingMessageSource(RemoteFileTemplate<com.jcraft.jsch.ChannelSftp.LsEntry> template, Comparator<com.jcraft.jsch.ChannelSftp.LsEntry> 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
-
asFileInfoList
protected List<AbstractFileInfo<com.jcraft.jsch.ChannelSftp.LsEntry>> asFileInfoList(Collection<com.jcraft.jsch.ChannelSftp.LsEntry> files)- Specified by:
asFileInfoListin classAbstractRemoteFileStreamingMessageSource<com.jcraft.jsch.ChannelSftp.LsEntry>
-
isDirectory
protected boolean isDirectory(com.jcraft.jsch.ChannelSftp.LsEntry file)- Specified by:
isDirectoryin classAbstractRemoteFileStreamingMessageSource<com.jcraft.jsch.ChannelSftp.LsEntry>
-