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 |
customProcessor, eagerLimitMaxMessagesPerPoll, endpoint, fileExpressionResult, operations, pendingExchanges, prepareOnStartup, processStrategy, shutdownRunningTask| Constructor and Description |
|---|
RemoteFileConsumer(RemoteFileEndpoint<T> endpoint,
org.apache.camel.Processor processor,
RemoteFileOperations<T> operations,
org.apache.camel.component.file.GenericFileProcessStrategy processStrategy) |
| 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 |
hasStartingDirectory()
Whether there is a starting directory configured.
|
protected boolean |
isRetrieveFile() |
protected void |
postPollCheck(int polledMessages) |
protected boolean |
prePollCheck() |
protected boolean |
processExchange(org.apache.camel.Exchange exchange) |
protected String |
remoteServer()
Returns human readable server information for logging purpose
|
afterPoll, beforePoll, canPollMoreFiles, customProcessExchange, doStart, evaluateFileExpression, getCustomProcessor, ignoreCannotRetrieveFile, isEagerLimitMaxMessagesPerPoll, isMatched, isMatched, isValidFile, onInit, poll, pollDirectory, processBatch, removeExcessiveInProgressFiles, removeExcessiveInProgressFiles, setCustomProcessor, setEagerLimitMaxMessagesPerPoll, setOperations, updateFileHeadersdeferShutdown, getMaxMessagesPerPoll, getPendingExchangesSize, isBatchAllowed, prepareShutdown, processEmptyMessage, setMaxMessagesPerPolldoInit, 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, startSchedulercreateUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, getRouteId, handleException, handleException, setExceptionHandler, setRoute, setRouteId, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected transient boolean loggedIn
protected transient boolean loggedInWarning
public RemoteFileConsumer(RemoteFileEndpoint<T> endpoint, org.apache.camel.Processor processor, RemoteFileOperations<T> operations, org.apache.camel.component.file.GenericFileProcessStrategy processStrategy)
public RemoteFileEndpoint<T> getEndpoint()
getEndpoint in interface org.apache.camel.EndpointAwaregetEndpoint in class org.apache.camel.support.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 boolean hasStartingDirectory()
protected void doStop()
throws Exception
protected void disconnect()
protected void forceDisconnect()
protected 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