@UriEndpoint(firstVersion="1.1.0", scheme="ftp", extendsScheme="file", title="FTP", syntax="ftp:host:port/directoryName", alternativeSyntax="ftp:username:password@host:port/directoryName", label="file", excludeProperties="appendChars,readLockIdempotentReleaseAsync,readLockIdempotentReleaseAsyncPoolSize,readLockIdempotentReleaseDelay,readLockIdempotentReleaseExecutorService") @ManagedResource(description="Managed FtpEndpoint") public class FtpEndpoint<T extends org.apache.commons.net.ftp.FTPFile> extends RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
Modifier and Type | Field and Description |
---|---|
protected FtpConfiguration |
configuration |
protected int |
dataTimeout |
protected org.apache.commons.net.ftp.FTPClient |
ftpClient |
protected org.apache.commons.net.ftp.FTPClientConfig |
ftpClientConfig |
protected Map<String,Object> |
ftpClientConfigParameters |
protected Map<String,Object> |
ftpClientParameters |
protected boolean |
resumeDownload |
protected int |
soTimeout |
protected int |
transferLoggingIntervalSeconds |
protected org.apache.camel.LoggingLevel |
transferLoggingLevel |
protected boolean |
transferLoggingVerbose |
allowNullBody, antExclude, antFilter, antFilterCaseSensitive, antInclude, appendChars, autoCreate, bufferSize, charset, DEFAULT_IDEMPOTENT_CACHE_SIZE, DEFAULT_IN_PROGRESS_CACHE_SIZE, DEFAULT_STRATEGYFACTORY_CLASS, delete, doneFileName, eagerDeleteTargetFile, eagerMaxMessagesPerPoll, exclude, exclusiveReadLockStrategy, fileExist, fileName, filter, filterDirectory, filterFile, flatten, idempotent, idempotentKey, idempotentRepository, include, inProgressRepository, jailStartingDirectory, keepLastModified, localWorkDirectory, log, maxDepth, maxMessagesPerPoll, minDepth, move, moveExisting, moveExistingFileStrategy, moveFailed, noop, onCompletionExceptionHandler, preMove, preSort, processStrategy, readLock, readLockCheckInterval, readLockDeleteOrphanLockFiles, readLockIdempotentReleaseAsync, readLockIdempotentReleaseAsyncPoolSize, readLockIdempotentReleaseDelay, readLockIdempotentReleaseExecutorService, readLockLoggingLevel, readLockMarkerFile, readLockMinAge, readLockMinLength, readLockRemoveOnCommit, readLockRemoveOnRollback, readLockTimeout, recursive, shuffle, sortBy, sorter, tempFileName, tempPrefix
Constructor and Description |
---|
FtpEndpoint() |
FtpEndpoint(String uri,
RemoteFileComponent<org.apache.commons.net.ftp.FTPFile> component,
FtpConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
protected RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile> |
buildConsumer(org.apache.camel.Processor processor)
Remote File Endpoints, impl this method to create a custom consumer specific to their "protocol" etc.
|
protected org.apache.camel.component.file.GenericFileProducer<org.apache.commons.net.ftp.FTPFile> |
buildProducer()
Remote File Endpoints, impl this method to create a custom producer specific to their "protocol" etc.
|
RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile> |
createConsumer(org.apache.camel.Processor processor) |
protected org.apache.commons.net.ftp.FTPClient |
createFtpClient() |
RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> |
createRemoteFileOperations()
Creates the operations to be used by the consumer or producer.
|
FtpConfiguration |
getConfiguration() |
int |
getDataTimeout() |
char |
getFileSeparator() |
org.apache.commons.net.ftp.FTPClient |
getFtpClient() |
org.apache.commons.net.ftp.FTPClientConfig |
getFtpClientConfig() |
Map<String,Object> |
getFtpClientConfigParameters() |
Map<String,Object> |
getFtpClientParameters() |
String |
getScheme() |
int |
getSoTimeout() |
int |
getTransferLoggingIntervalSeconds() |
org.apache.camel.LoggingLevel |
getTransferLoggingLevel() |
String |
getTransferLoggingLevelName() |
boolean |
isResumeDownload() |
boolean |
isTransferLoggingVerbose() |
void |
setConfiguration(org.apache.camel.component.file.GenericFileConfiguration configuration) |
void |
setDataTimeout(int dataTimeout)
Sets the data timeout on the FTP client.
|
void |
setFtpClient(org.apache.commons.net.ftp.FTPClient ftpClient)
To use a custom instance of FTPClient
|
void |
setFtpClientConfig(org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig)
To use a custom instance of FTPClientConfig to configure the FTP client the endpoint should use.
|
void |
setResumeDownload(boolean resumeDownload)
Configures whether resume download is enabled.
|
void |
setSoTimeout(int soTimeout)
Sets the soTimeout on the FTP client.
|
void |
setTransferLoggingIntervalSeconds(int transferLoggingIntervalSeconds)
Configures the interval in seconds to use when logging the progress of upload and download operations that are in-flight.
|
void |
setTransferLoggingLevel(org.apache.camel.LoggingLevel transferLoggingLevel)
Configure the logging level to use when logging the progress of upload and download operations.
|
void |
setTransferLoggingLevelName(String transferLoggingLevel) |
void |
setTransferLoggingVerbose(boolean transferLoggingVerbose)
Configures whether the perform verbose (fine grained) logging of the progress of upload and download operations.
|
afterPropertiesSet, createExchange, createPollingConsumer, createProducer, getMaximumReconnectAttempts, getParamsAsMap, getReconnectDelay, isAbsolute, isDisconnect, isDisconnectOnBatchComplete, isDownload, isFastExistsCheck, remoteServerInformation, setDisconnect, setDisconnectOnBatchComplete, setDownload, setFastExistsCheck, setMaximumReconnectAttempts, setReconnectDelay
configureExchange, configureMessage, configureMoveOrPreMoveExpression, createDoneFileName, createGenericFileStrategy, doStart, doStop, getAntExclude, getAntFilter, getAntInclude, getAppendChars, getBufferSize, getCharset, getDoneFileName, getExchanges, getExclude, getExcludePattern, getExclusiveReadLockStrategy, getFileExist, getFileName, getFilter, getFilterDirectory, getFilterFile, getGeneratedFileName, getIdempotent, getIdempotentKey, getIdempotentRepository, getInclude, getIncludePattern, getInProgressRepository, getLocalWorkDirectory, getMaxDepth, getMaxMessagesPerPoll, getMinDepth, getMove, getMoveExisting, getMoveExistingFileStrategy, getMoveFailed, getOnCompletionExceptionHandler, getPreMove, getProcessStrategy, getReadLock, getReadLockCheckInterval, getReadLockIdempotentReleaseAsyncPoolSize, getReadLockIdempotentReleaseDelay, getReadLockIdempotentReleaseExecutorService, getReadLockLoggingLevel, getReadLockMinAge, getReadLockMinLength, getReadLockTimeout, getSortBy, getSorter, getTempFileName, getTempPrefix, isAllowNullBody, isAntFilterCaseSensitive, isAutoCreate, isDelete, isDoneFile, isEagerDeleteTargetFile, isEagerMaxMessagesPerPoll, isFlatten, isIdempotent, isIdempotentSet, isJailStartingDirectory, isKeepLastModified, isNoop, isPreSort, isReadLockDeleteOrphanLockFiles, isReadLockIdempotentReleaseAsync, isReadLockMarkerFile, isReadLockRemoveOnCommit, isReadLockRemoveOnRollback, isRecursive, isShuffle, setAllowNullBody, setAntExclude, setAntFilterCaseSensitive, setAntInclude, setAppendChars, setAutoCreate, setBufferSize, setCharset, setDelete, setDoneFileName, setEagerDeleteTargetFile, setEagerMaxMessagesPerPoll, setExclude, setExclusiveReadLockStrategy, setFileExist, setFileName, setFileName, setFilter, setFilterDirectory, setFilterDirectory, setFilterFile, setFilterFile, setFlatten, setIdempotent, setIdempotentKey, setIdempotentKey, setIdempotentRepository, setInclude, setInProgressRepository, setJailStartingDirectory, setKeepLastModified, setLocalWorkDirectory, setMaxDepth, setMaxMessagesPerPoll, setMinDepth, setMove, setMove, setMoveExisting, setMoveExisting, setMoveExistingFileStrategy, setMoveFailed, setMoveFailed, setNoop, setOnCompletionExceptionHandler, setPreMove, setPreMove, setPreSort, setProcessStrategy, setReadLock, setReadLockCheckInterval, setReadLockDeleteOrphanLockFiles, setReadLockIdempotentReleaseAsync, setReadLockIdempotentReleaseAsyncPoolSize, setReadLockIdempotentReleaseDelay, setReadLockIdempotentReleaseExecutorService, setReadLockLoggingLevel, setReadLockMarkerFile, setReadLockMinAge, setReadLockMinLength, setReadLockRemoveOnCommit, setReadLockRemoveOnRollback, setReadLockTimeout, setRecursive, setShuffle, setSortBy, setSortBy, setSortBy, setSorter, setTempFileName, setTempFileName, setTempPrefix
configureConsumer, configureProperties, configureScheduledPollConsumerProperties, doConfigureConsumer, getBackoffErrorThreshold, getBackoffIdleThreshold, getBackoffMultiplier, getDelay, getInitialDelay, getPollStrategy, getRepeatCount, getRunLoggingLevel, getScheduledExecutorService, getScheduler, getSchedulerProperties, getTimeUnit, isGreedy, isSendEmptyMessageWhenIdle, isStartScheduler, isUseFixedDelay, setBackoffErrorThreshold, setBackoffIdleThreshold, setBackoffMultiplier, setDelay, setGreedy, setInitialDelay, setPollStrategy, setRepeatCount, setRunLoggingLevel, setScheduledExecutorService, setScheduler, setSchedulerProperties, setSendEmptyMessageWhenIdle, setStartScheduler, setTimeUnit, setUseFixedDelay
configurePollingConsumer, createAsyncProducer, createEndpointUri, createExchange, createExchange, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected int soTimeout
protected int dataTimeout
@UriParam protected FtpConfiguration configuration
@UriParam(label="advanced") protected org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig
@UriParam(label="advanced", prefix="ftpClientConfig.", multiValue=true) protected Map<String,Object> ftpClientConfigParameters
@UriParam(label="advanced", prefix="ftpClient.", multiValue=true) protected Map<String,Object> ftpClientParameters
@UriParam(label="advanced") protected org.apache.commons.net.ftp.FTPClient ftpClient
@UriParam(label="common", defaultValue="DEBUG") protected org.apache.camel.LoggingLevel transferLoggingLevel
@UriParam(label="common", defaultValue="5") protected int transferLoggingIntervalSeconds
@UriParam(label="common") protected boolean transferLoggingVerbose
@UriParam(label="consumer") protected boolean resumeDownload
public FtpEndpoint()
public FtpEndpoint(String uri, RemoteFileComponent<org.apache.commons.net.ftp.FTPFile> component, FtpConfiguration configuration)
public String getScheme()
getScheme
in class org.apache.camel.component.file.GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile>
public RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile> createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
createConsumer
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
Exception
protected RemoteFileConsumer<org.apache.commons.net.ftp.FTPFile> buildConsumer(org.apache.camel.Processor processor)
RemoteFileEndpoint
buildConsumer
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
processor
- the processorprotected org.apache.camel.component.file.GenericFileProducer<org.apache.commons.net.ftp.FTPFile> buildProducer()
RemoteFileEndpoint
buildProducer
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
public RemoteFileOperations<org.apache.commons.net.ftp.FTPFile> createRemoteFileOperations() throws Exception
RemoteFileEndpoint
createRemoteFileOperations
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
Exception
- is thrown if error creating operations.protected org.apache.commons.net.ftp.FTPClient createFtpClient() throws Exception
Exception
public FtpConfiguration getConfiguration()
getConfiguration
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
public void setConfiguration(org.apache.camel.component.file.GenericFileConfiguration configuration)
setConfiguration
in class org.apache.camel.component.file.GenericFileEndpoint<org.apache.commons.net.ftp.FTPFile>
public org.apache.commons.net.ftp.FTPClient getFtpClient()
public void setFtpClient(org.apache.commons.net.ftp.FTPClient ftpClient)
public org.apache.commons.net.ftp.FTPClientConfig getFtpClientConfig()
public void setFtpClientConfig(org.apache.commons.net.ftp.FTPClientConfig ftpClientConfig)
public int getSoTimeout()
public void setSoTimeout(int soTimeout)
public int getDataTimeout()
public void setDataTimeout(int dataTimeout)
public org.apache.camel.LoggingLevel getTransferLoggingLevel()
public void setTransferLoggingLevel(org.apache.camel.LoggingLevel transferLoggingLevel)
@ManagedAttribute(description="Logging level to use when logging the progress of upload and download operations") public void setTransferLoggingLevelName(String transferLoggingLevel)
@ManagedAttribute public String getTransferLoggingLevelName()
@ManagedAttribute public int getTransferLoggingIntervalSeconds()
@ManagedAttribute(description="Interval in seconds to use when logging the progress of upload and download operations that are in-flight") public void setTransferLoggingIntervalSeconds(int transferLoggingIntervalSeconds)
@ManagedAttribute public boolean isTransferLoggingVerbose()
@ManagedAttribute(description="Whether the perform verbose (fine grained) logging of the progress of upload and download operations") public void setTransferLoggingVerbose(boolean transferLoggingVerbose)
public boolean isResumeDownload()
public void setResumeDownload(boolean resumeDownload)
public char getFileSeparator()
getFileSeparator
in class RemoteFileEndpoint<org.apache.commons.net.ftp.FTPFile>
Apache Camel