@UriEndpoint(firstVersion="1.0.0", scheme="file", title="File", syntax="file:directoryName", label="core,file") public class FileEndpoint extends GenericFileEndpoint<File>
allowNullBody, antExclude, antFilter, antFilterCaseSensitive, antInclude, appendChars, autoCreate, bufferSize, charset, configuration, 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 |
---|
FileEndpoint() |
FileEndpoint(String endpointUri,
org.apache.camel.Component component) |
Modifier and Type | Method and Description |
---|---|
boolean |
chmodPermissionsAreValid(String chmod)
Chmod value must be between 000 and 777; If there is a leading digit like in 0755 we will ignore it.
|
FileConsumer |
createConsumer(org.apache.camel.Processor processor) |
protected String |
createEndpointUri() |
org.apache.camel.Exchange |
createExchange(GenericFile<File> file) |
org.apache.camel.PollingConsumer |
createPollingConsumer() |
GenericFileProducer<File> |
createProducer() |
String |
getChmod() |
String |
getChmodDirectory() |
Set<PosixFilePermission> |
getDirectoryPermissions() |
String |
getExtendedAttributes() |
File |
getFile() |
char |
getFileSeparator() |
Set<PosixFilePermission> |
getPermissions() |
String |
getScheme() |
boolean |
isAbsolute(String name) |
boolean |
isCopyAndDeleteOnRenameFail() |
boolean |
isDirectoryMustExist() |
boolean |
isForceWrites() |
boolean |
isProbeContentType() |
boolean |
isRenameUsingCopy() |
boolean |
isStartingDirectoryMustExist() |
boolean |
isStartingDirectoryMustHaveAccess() |
protected FileConsumer |
newFileConsumer(org.apache.camel.Processor processor,
GenericFileOperations<File> operations)
Strategy to create a new
FileConsumer |
void |
setChmod(String chmod)
Specify the file permissions which is sent by the producer, the chmod value must be between 000 and 777;
If there is a leading digit like in 0755 we will ignore it.
|
void |
setChmodDirectory(String chmodDirectory)
Specify the directory permissions used when the producer creates missing directories, the chmod value must be between 000 and 777;
If there is a leading digit like in 0755 we will ignore it.
|
void |
setCopyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)
Whether to fallback and do a copy and delete file, in case the file could not be renamed directly.
|
void |
setDirectoryMustExist(boolean directoryMustExist)
Similar to the startingDirectoryMustExist option but this applies during polling (after starting the consumer).
|
void |
setExtendedAttributes(String extendedAttributes)
To define which file attributes of interest.
|
void |
setFile(File file)
The starting directory
|
void |
setForceWrites(boolean forceWrites)
Whether to force syncing writes to the file system.
|
void |
setProbeContentType(boolean probeContentType)
Whether to enable probing of the content type.
|
void |
setRenameUsingCopy(boolean renameUsingCopy)
Perform rename operations using a copy and delete strategy.
|
void |
setStartingDirectoryMustExist(boolean startingDirectoryMustExist)
Whether the starting directory must exist.
|
void |
setStartingDirectoryMustHaveAccess(boolean startingDirectoryMustHaveAccess)
Whether the starting directory has access permissions.
|
configureExchange, configureMessage, configureMoveOrPreMoveExpression, createDoneFileName, createGenericFileStrategy, doStart, doStop, getAntExclude, getAntFilter, getAntInclude, getAppendChars, getBufferSize, getCharset, getConfiguration, 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, getParamsAsMap, 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, setConfiguration, 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, 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
build, doBuild, doResume, doShutdown, doSuspend, getStatus, init, isBuild, 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
public FileEndpoint()
public FileEndpoint(String endpointUri, org.apache.camel.Component component)
public FileConsumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
createConsumer
in class GenericFileEndpoint<File>
Exception
public org.apache.camel.PollingConsumer createPollingConsumer() throws Exception
createPollingConsumer
in interface org.apache.camel.Endpoint
createPollingConsumer
in class org.apache.camel.support.DefaultEndpoint
Exception
public GenericFileProducer<File> createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
createProducer
in class GenericFileEndpoint<File>
Exception
public org.apache.camel.Exchange createExchange(GenericFile<File> file)
createExchange
in class GenericFileEndpoint<File>
protected FileConsumer newFileConsumer(org.apache.camel.Processor processor, GenericFileOperations<File> operations)
FileConsumer
processor
- the given processoroperations
- file operationspublic File getFile()
public void setFile(File file)
public String getScheme()
getScheme
in class GenericFileEndpoint<File>
protected String createEndpointUri()
createEndpointUri
in class org.apache.camel.support.DefaultEndpoint
public char getFileSeparator()
getFileSeparator
in class GenericFileEndpoint<File>
public boolean isAbsolute(String name)
isAbsolute
in class GenericFileEndpoint<File>
public boolean isCopyAndDeleteOnRenameFail()
public void setCopyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)
public boolean isRenameUsingCopy()
public void setRenameUsingCopy(boolean renameUsingCopy)
public boolean isStartingDirectoryMustExist()
public void setStartingDirectoryMustExist(boolean startingDirectoryMustExist)
public boolean isStartingDirectoryMustHaveAccess()
public void setStartingDirectoryMustHaveAccess(boolean startingDirectoryMustHaveAccess)
public boolean isDirectoryMustExist()
public void setDirectoryMustExist(boolean directoryMustExist)
public boolean isForceWrites()
public void setForceWrites(boolean forceWrites)
public boolean isProbeContentType()
public void setProbeContentType(boolean probeContentType)
Files.probeContentType(java.nio.file.Path)
to
determine the content-type of the file, and store that as a header with key Exchange.FILE_CONTENT_TYPE
on the Message
.public String getExtendedAttributes()
public void setExtendedAttributes(String extendedAttributes)
public boolean chmodPermissionsAreValid(String chmod)
public Set<PosixFilePermission> getPermissions()
public String getChmod()
public void setChmod(String chmod)
public Set<PosixFilePermission> getDirectoryPermissions()
public String getChmodDirectory()
public void setChmodDirectory(String chmodDirectory)
Apache Camel