org.apache.camel.component.file.remote
Class FtpConsumer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.DefaultConsumer<E>
org.apache.camel.impl.ScheduledPollConsumer<T>
org.apache.camel.component.file.remote.RemoteFileConsumer<RemoteFileExchange>
org.apache.camel.component.file.remote.FtpConsumer
- All Implemented Interfaces:
- Runnable, Consumer<RemoteFileExchange>, Service
public class FtpConsumer
- extends RemoteFileConsumer<RemoteFileExchange>
Fields inherited from class org.apache.camel.component.file.remote.RemoteFileConsumer |
deleteFile, excludedNamePostfix, excludedNamePrefix, exclusiveReadLock, lastPollTime, log, moveNamePostfix, moveNamePrefix, recursive, regexPattern, setNames |
Methods inherited from class org.apache.camel.component.file.remote.RemoteFileConsumer |
getExcludedNamePostfix, getExcludedNamePrefix, getLastPollTime, getMoveFileName, getMoveNamePostfix, getMoveNamePrefix, getRegexPattern, isDeleteFile, isExclusiveReadLock, isMatched, isMoveFile, isRecursive, isSetNames, isTimestamp, remoteServer, setDeleteFile, setExcludedNamePostfix, setExcludedNamePrefix, setExclusiveReadLock, setLastPollTime, setMoveNamePostfix, setMoveNamePrefix, setRecursive, setRegexPattern, setSetNames, setTimestamp |
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
FtpConsumer
public FtpConsumer(FtpEndpoint endpoint,
Processor processor,
org.apache.commons.net.ftp.FTPClient client)
FtpConsumer
public FtpConsumer(FtpEndpoint endpoint,
Processor processor,
org.apache.commons.net.ftp.FTPClient client,
ScheduledExecutorService executor)
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class ScheduledPollConsumer<RemoteFileExchange>
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class ScheduledPollConsumer<RemoteFileExchange>
- Throws:
Exception
connectIfNecessary
protected void connectIfNecessary()
throws IOException
- Throws:
IOException
disconnect
protected void disconnect()
throws IOException
- Throws:
IOException
poll
protected void poll()
throws Exception
- Specified by:
poll
in class ScheduledPollConsumer<RemoteFileExchange>
- Throws:
Exception
pollDirectory
protected void pollDirectory(String dir)
throws Exception
- Throws:
Exception
getFullFileName
protected String getFullFileName(org.apache.commons.net.ftp.FTPFile ftpFile)
throws IOException
- Throws:
IOException
acquireExclusiveReadLock
protected void acquireExclusiveReadLock(org.apache.commons.net.ftp.FTPClient client,
org.apache.commons.net.ftp.FTPFile ftpFile)
throws IOException
- Throws:
IOException
getFileName
protected String getFileName(Object file)
- Description copied from class:
RemoteFileConsumer
- Gets the filename.
- Specified by:
getFileName
in class RemoteFileConsumer<RemoteFileExchange>
- Parameters:
file
- the file object for the given consumer implementation.
- Returns:
- the filename as String.
Apache CAMEL