org.apache.camel.component.file.remote
Class SftpConsumer

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.impl.ScheduledPollConsumer
              extended by org.apache.camel.impl.ScheduledBatchPollingConsumer
                  extended by org.apache.camel.component.file.GenericFileConsumer<T>
                      extended by org.apache.camel.component.file.remote.RemoteFileConsumer<com.jcraft.jsch.ChannelSftp.LsEntry>
                          extended by org.apache.camel.component.file.remote.SftpConsumer
All Implemented Interfaces:
Runnable, org.apache.camel.BatchConsumer, org.apache.camel.Consumer, org.apache.camel.PollingConsumerPollingStrategy, org.apache.camel.RouteAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ShutdownAware, org.apache.camel.spi.ShutdownPrepared, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class SftpConsumer
extends RemoteFileConsumer<com.jcraft.jsch.ChannelSftp.LsEntry>

Secure FTP consumer


Field Summary
 
Fields inherited from class org.apache.camel.component.file.remote.RemoteFileConsumer
loggedIn, loggedInWarning
 
Fields inherited from class org.apache.camel.component.file.GenericFileConsumer
customProcessor, eagerLimitMaxMessagesPerPoll, endpoint, fileExpressionResult, log, operations, pendingExchanges, prepareOnStartup, shutdownRunningTask
 
Fields inherited from class org.apache.camel.impl.ScheduledBatchPollingConsumer
maxMessagesPerPoll
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
SftpConsumer(RemoteFileEndpoint<com.jcraft.jsch.ChannelSftp.LsEntry> endpoint, org.apache.camel.Processor processor, RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry> operations)
           
 
Method Summary
protected  boolean doPollDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList, int depth)
           
protected  boolean ignoreCannotRetrieveFile(String name, org.apache.camel.Exchange exchange, Exception cause)
           
protected  boolean isMatched(org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry> file, String doneFileName, List<com.jcraft.jsch.ChannelSftp.LsEntry> files)
           
protected  boolean pollDirectory(String fileName, List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList, int depth)
           
protected  boolean pollSubDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList, int depth)
           
 
Methods inherited from class org.apache.camel.component.file.remote.RemoteFileConsumer
connectIfNecessary, disconnect, doStop, getEndpoint, getOperations, isRetrieveFile, postPollCheck, prePollCheck, processExchange, recoverableConnectIfNecessary, remoteServer
 
Methods inherited from class org.apache.camel.component.file.GenericFileConsumer
canPollMoreFiles, customProcessExchange, doStart, evaluateFileExpression, getCustomProcessor, isEagerLimitMaxMessagesPerPoll, isInProgress, isMatched, isValidFile, poll, processBatch, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperations
 
Methods inherited from class org.apache.camel.impl.ScheduledBatchPollingConsumer
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPoll
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
afterPoll, beforePoll, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, onInit, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
 

Constructor Detail

SftpConsumer

public SftpConsumer(RemoteFileEndpoint<com.jcraft.jsch.ChannelSftp.LsEntry> endpoint,
                    org.apache.camel.Processor processor,
                    RemoteFileOperations<com.jcraft.jsch.ChannelSftp.LsEntry> operations)
Method Detail

pollDirectory

protected boolean pollDirectory(String fileName,
                                List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList,
                                int depth)
Specified by:
pollDirectory in class org.apache.camel.component.file.GenericFileConsumer<com.jcraft.jsch.ChannelSftp.LsEntry>

pollSubDirectory

protected boolean pollSubDirectory(String absolutePath,
                                   String dirName,
                                   List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList,
                                   int depth)

doPollDirectory

protected boolean doPollDirectory(String absolutePath,
                                  String dirName,
                                  List<org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry>> fileList,
                                  int depth)

isMatched

protected boolean isMatched(org.apache.camel.component.file.GenericFile<com.jcraft.jsch.ChannelSftp.LsEntry> file,
                            String doneFileName,
                            List<com.jcraft.jsch.ChannelSftp.LsEntry> files)
Specified by:
isMatched in class org.apache.camel.component.file.GenericFileConsumer<com.jcraft.jsch.ChannelSftp.LsEntry>

ignoreCannotRetrieveFile

protected boolean ignoreCannotRetrieveFile(String name,
                                           org.apache.camel.Exchange exchange,
                                           Exception cause)
Overrides:
ignoreCannotRetrieveFile in class org.apache.camel.component.file.GenericFileConsumer<com.jcraft.jsch.ChannelSftp.LsEntry>


Apache Camel