@ManagedResource(description="Managed FtpConsumer") public class FtpConsumer extends RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile>
Modifier and Type | Field and Description |
---|---|
protected String |
endpointPath |
loggedIn, loggedInWarning
customProcessor, eagerLimitMaxMessagesPerPoll, endpoint, fileExpressionResult, operations, pendingExchanges, prepareOnStartup, processStrategy, shutdownRunningTask
Constructor and Description |
---|
FtpConsumer(RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile> endpoint,
org.apache.camel.Processor processor,
RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> fileOperations,
org.apache.camel.component.file.GenericFileProcessStrategy processStrategy) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
doPollDirectory(String absolutePath,
String dirName,
List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList,
int depth)
Poll directory given by dirName or absolutePath
|
protected void |
doStart() |
String |
getLastFtpActivity() |
String |
getLastFtpActivityVerbose() |
protected FtpOperations |
getOperations() |
protected boolean |
ignoreCannotRetrieveFile(String name,
org.apache.camel.Exchange exchange,
Exception cause) |
protected boolean |
isMatched(org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile> file,
String doneFileName,
List<org.apache.commons.net.ftp.FTPFile> files) |
protected boolean |
pollDirectory(String fileName,
List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList,
int depth) |
protected boolean |
pollSubDirectory(String absolutePath,
String dirName,
List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList,
int depth) |
String |
toString() |
protected void |
updateFileHeaders(org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile> file,
org.apache.camel.Message message) |
connectIfNecessary, disconnect, doSafePollSubDirectory, doStop, forceDisconnect, getEndpoint, isRetrieveFile, postPollCheck, prePollCheck, processExchange, remoteServer
afterPoll, beforePoll, canPollMoreFiles, customProcessExchange, evaluateFileExpression, getCustomProcessor, isEagerLimitMaxMessagesPerPoll, isMatched, isValidFile, onInit, poll, processBatch, removeExcessiveInProgressFiles, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperations
deferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPoll
doInit, doShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, run, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay, startScheduler
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute
build, doBuild, doResume, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
protected String endpointPath
public FtpConsumer(RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile> endpoint, org.apache.camel.Processor processor, RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> fileOperations, org.apache.camel.component.file.GenericFileProcessStrategy processStrategy)
protected FtpOperations getOperations()
getOperations
in class RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile>
protected void doStart() throws Exception
doStart
in class org.apache.camel.component.file.GenericFileConsumer<org.apache.commons.net.ftp.FTPFile>
Exception
protected boolean pollDirectory(String fileName, List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList, int depth)
pollDirectory
in class org.apache.camel.component.file.GenericFileConsumer<org.apache.commons.net.ftp.FTPFile>
protected boolean pollSubDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList, int depth)
protected boolean doPollDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile>> fileList, int depth)
RemoteFileConsumer
doPollDirectory
in class RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile>
absolutePath
- The path of the directory to polldirName
- The name of the directory to pollfileList
- current list of files gathereddepth
- the current depth of the directoryprotected boolean isMatched(org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile> file, String doneFileName, List<org.apache.commons.net.ftp.FTPFile> files)
isMatched
in class org.apache.camel.component.file.GenericFileConsumer<org.apache.commons.net.ftp.FTPFile>
protected boolean ignoreCannotRetrieveFile(String name, org.apache.camel.Exchange exchange, Exception cause)
ignoreCannotRetrieveFile
in class org.apache.camel.component.file.GenericFileConsumer<org.apache.commons.net.ftp.FTPFile>
protected void updateFileHeaders(org.apache.camel.component.file.GenericFile<org.apache.commons.net.ftp.FTPFile> file, org.apache.camel.Message message)
updateFileHeaders
in class org.apache.camel.component.file.GenericFileConsumer<org.apache.commons.net.ftp.FTPFile>
@ManagedAttribute(description="Summary of last FTP activity (download only)") public String getLastFtpActivity()
@ManagedAttribute(description="Summary of last FTP activity (all)") public String getLastFtpActivityVerbose()
public String toString()
toString
in class org.apache.camel.support.DefaultConsumer
Apache Camel