public abstract class RemoteFileConsumer<T>
extends org.apache.camel.component.file.GenericFileConsumer<T>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
loggedIn |
protected boolean |
loggedInWarning |
| Constructor and Description |
|---|
RemoteFileConsumer(RemoteFileEndpoint<T> endpoint,
org.apache.camel.Processor processor,
RemoteFileOperations<T> operations) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectIfNecessary() |
protected void |
disconnect() |
protected abstract boolean |
doPollDirectory(String absolutePath,
String dirName,
List<org.apache.camel.component.file.GenericFile<T>> fileList,
int depth)
Poll directory given by dirName or absolutePath
|
protected boolean |
doSafePollSubDirectory(String absolutePath,
String dirName,
List<org.apache.camel.component.file.GenericFile<T>> fileList,
int depth)
Executes doPollDirectory and on exception checks if it can be ignored by calling ignoreCannotRetrieveFile.
|
protected void |
doStop() |
protected void |
forceDisconnect() |
RemoteFileEndpoint<T> |
getEndpoint() |
protected RemoteFileOperations<T> |
getOperations() |
protected boolean |
isRetrieveFile() |
protected void |
postPollCheck(int polledMessages) |
protected boolean |
prePollCheck() |
protected boolean |
processExchange(org.apache.camel.Exchange exchange) |
protected void |
recoverableConnectIfNecessary() |
protected String |
remoteServer()
Returns human readable server information for logging purpose
|
afterPoll, beforePoll, canPollMoreFiles, customProcessExchange, doStart, evaluateFileExpression, getCustomProcessor, ignoreCannotRetrieveFile, isEagerLimitMaxMessagesPerPoll, isInProgress, isMatched, isMatched, isValidFile, onInit, poll, pollDirectory, processBatch, removeExcessiveInProgressFiles, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperations, updateFileHeadersdeferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPolldoShutdown, doSuspend, getBackoffCounter, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isPollAllowed, isPolling, isSchedulerStarted, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, 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, suspendprotected transient boolean loggedIn
protected transient boolean loggedInWarning
public RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, org.apache.camel.Processor processor, RemoteFileOperations<T> operations)
public RemoteFileEndpoint<T> getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.impl.DefaultConsumerprotected RemoteFileOperations<T> getOperations()
protected boolean prePollCheck()
throws Exception
protected void postPollCheck(int polledMessages)
postPollCheck in class org.apache.camel.component.file.GenericFileConsumer<T>protected boolean processExchange(org.apache.camel.Exchange exchange)
processExchange in class org.apache.camel.component.file.GenericFileConsumer<T>protected boolean isRetrieveFile()
isRetrieveFile in class org.apache.camel.component.file.GenericFileConsumer<T>protected void doStop()
throws Exception
protected void disconnect()
protected void forceDisconnect()
protected void recoverableConnectIfNecessary()
throws Exception
Exceptionprotected void connectIfNecessary()
throws IOException
IOExceptionprotected String remoteServer()
protected boolean doSafePollSubDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<T>> fileList, int depth)
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 directoryorg.apache.camel.component.file.GenericFileOperationFailedException - if the exception during doPollDirectory can not be ignoredprotected abstract boolean doPollDirectory(String absolutePath, String dirName, List<org.apache.camel.component.file.GenericFile<T>> fileList, int depth)
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 directoryApache Camel