Spring Integration

org.springframework.integration.sftp.impl
Class SftpInboundRemoteFileSystemSynchronizer

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.file.AbstractInboundRemoteFileSystemSychronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
              extended by org.springframework.integration.sftp.impl.SftpInboundRemoteFileSystemSynchronizer
All Implemented Interfaces:
BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent

public class SftpInboundRemoteFileSystemSynchronizer
extends AbstractInboundRemoteFileSystemSychronizer<com.jcraft.jsch.ChannelSftp.LsEntry>

This handles the synchronization between a remote SFTP endpoint and a local mount

Author:
Josh Long

Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.integration.file.AbstractInboundRemoteFileSystemSychronizer
AbstractInboundRemoteFileSystemSychronizer.EntryAcknowledgmentStrategy<T>
 
Field Summary
 
Fields inherited from class org.springframework.integration.file.AbstractInboundRemoteFileSystemSychronizer
entryAcknowledgmentStrategy, filter, localDirectory, scheduledFuture, shouldDeleteSourceFile
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
SftpInboundRemoteFileSystemSynchronizer()
           
 
Method Summary
protected  Trigger getTrigger()
          Returns a value in millis dictating how frequently the trigger should fire
protected  void onInit()
          Subclasses may implement this for initialization logic.
 void setClientPool(SftpSessionPool clientPool)
           
 void setRemotePath(String remotePath)
           
protected  void syncRemoteToLocalFileSystem()
          This is the callback where we need the implementation to do some specific work
 
Methods inherited from class org.springframework.integration.file.AbstractInboundRemoteFileSystemSychronizer
acknowledge, doStart, doStop, setEntryAcknowledgmentStrategy, setFilter, setLocalDirectory, setShouldDeleteSourceFile
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getComponentType, getConversionService, getRequiredMetadataPersister, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SftpInboundRemoteFileSystemSynchronizer

public SftpInboundRemoteFileSystemSynchronizer()
Method Detail

setRemotePath

public void setRemotePath(String remotePath)

onInit

protected void onInit()
               throws Exception
Description copied from class: IntegrationObjectSupport
Subclasses may implement this for initialization logic.

Overrides:
onInit in class IntegrationObjectSupport
Throws:
Exception

setClientPool

public void setClientPool(SftpSessionPool clientPool)

syncRemoteToLocalFileSystem

protected void syncRemoteToLocalFileSystem()
                                    throws Exception
Description copied from class: AbstractInboundRemoteFileSystemSychronizer
This is the callback where we need the implementation to do some specific work

Specified by:
syncRemoteToLocalFileSystem in class AbstractInboundRemoteFileSystemSychronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
Throws:
Exception - thrown if anything goes wrong

getTrigger

protected Trigger getTrigger()
Description copied from class: AbstractInboundRemoteFileSystemSychronizer
Returns a value in millis dictating how frequently the trigger should fire

Specified by:
getTrigger in class AbstractInboundRemoteFileSystemSychronizer<com.jcraft.jsch.ChannelSftp.LsEntry>
Returns:
a Trigger implementation (likely, PeriodicTrigger)

Spring Integration

Copyright © 2010. All Rights Reserved.