public class FileConsumer extends GenericFileConsumer<File>
customProcessor, eagerLimitMaxMessagesPerPoll, endpoint, fileExpressionResult, log, loggedIn, operations, pendingExchanges, prepareOnStartup, shutdownRunningTaskmaxMessagesPerPollshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
FileConsumer(GenericFileEndpoint<File> endpoint,
Processor processor,
GenericFileOperations<File> operations) |
| Modifier and Type | Method and Description |
|---|---|
static GenericFile<File> |
asGenericFile(String endpointPath,
File file,
String charset)
Creates a new GenericFile
|
FileEndpoint |
getEndpoint()
Gets the endpoint associated with an object.
|
protected boolean |
isMatched(GenericFile<File> file,
String doneFileName,
List<File> files)
Strategy to perform file matching based on endpoint configuration in terms of done file name.
|
protected boolean |
pollDirectory(String fileName,
List<GenericFile<File>> fileList,
int depth)
Polls the given directory for files to process
|
canPollMoreFiles, customProcessExchange, doStart, doStop, evaluateFileExpression, getCustomProcessor, ignoreCannotRetrieveFile, isEagerLimitMaxMessagesPerPoll, isInProgress, isMatched, isRetrieveFile, isValidFile, poll, postPollCheck, prePollCheck, processBatch, processExchange, removeExcessiveInProgressFiles, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperationsdeferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPollafterPoll, 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, startSchedulercreateUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, toStringdoResume, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisSuspended, resume, suspendpublic FileConsumer(GenericFileEndpoint<File> endpoint, Processor processor, GenericFileOperations<File> operations)
protected boolean pollDirectory(String fileName, List<GenericFile<File>> fileList, int depth)
GenericFileConsumerpollDirectory in class GenericFileConsumer<File>fileName - current directory or filefileList - current list of files gathereddepth - the current depth of the directory (will start from 0)protected boolean isMatched(GenericFile<File> file, String doneFileName, List<File> files)
GenericFileConsumerisMatched in class GenericFileConsumer<File>file - the filedoneFileName - the done file name (without any paths)files - files in the directorypublic static GenericFile<File> asGenericFile(String endpointPath, File file, String charset)
endpointPath - the starting directory the endpoint was configured withfile - the source filepublic FileEndpoint getEndpoint()
EndpointAwareProducer
or for consuming from for components like Consumer or RoutegetEndpoint in interface EndpointAwaregetEndpoint in class DefaultConsumerApache Camel