Interface FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
-
- All Superinterfaces:
org.apache.camel.builder.EndpointProducerBuilder
,org.apache.camel.EndpointProducerResolver
- All Known Subinterfaces:
FileEndpointBuilderFactory.AdvancedFileEndpointBuilder
- Enclosing interface:
- FileEndpointBuilderFactory
public static interface FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder extends org.apache.camel.builder.EndpointProducerBuilder
Advanced builder for endpoint producers for the File component.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
allowNullBody(boolean allowNullBody)
Used to specify if a null body is allowed during file writing.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
allowNullBody(String allowNullBody)
Used to specify if a null body is allowed during file writing.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
autoCreate(boolean autoCreate)
Automatically create missing directories in the file's pathname.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
autoCreate(String autoCreate)
Automatically create missing directories in the file's pathname.default FileEndpointBuilderFactory.FileEndpointProducerBuilder
basic()
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
bufferSize(int bufferSize)
Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading files).default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
bufferSize(String bufferSize)
Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading files).default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
chmod(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.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
chmodDirectory(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.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
copyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)
Whether to fallback and do a copy and delete file, in case the file could not be renamed directly.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
copyAndDeleteOnRenameFail(String copyAndDeleteOnRenameFail)
Whether to fallback and do a copy and delete file, in case the file could not be renamed directly.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
eagerDeleteTargetFile(boolean eagerDeleteTargetFile)
Whether or not to eagerly delete any existing target file.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
eagerDeleteTargetFile(String eagerDeleteTargetFile)
Whether or not to eagerly delete any existing target file.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
forceWrites(boolean forceWrites)
Whether to force syncing writes to the file system.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
forceWrites(String forceWrites)
Whether to force syncing writes to the file system.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
keepLastModified(boolean keepLastModified)
Will keep the last modified timestamp from the source file (if any).default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
keepLastModified(String keepLastModified)
Will keep the last modified timestamp from the source file (if any).default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
moveExistingFileStrategy(String moveExistingFileStrategy)
Strategy (Custom Strategy) used to move file with special naming token to use when fileExist=Move is configured.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
moveExistingFileStrategy(org.apache.camel.component.file.strategy.FileMoveExistingStrategy moveExistingFileStrategy)
Strategy (Custom Strategy) used to move file with special naming token to use when fileExist=Move is configured.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
renameUsingCopy(boolean renameUsingCopy)
Perform rename operations using a copy and delete strategy.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
renameUsingCopy(String renameUsingCopy)
Perform rename operations using a copy and delete strategy.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
synchronous(boolean synchronous)
Sets whether synchronous processing should be strictly used.default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder
synchronous(String synchronous)
Sets whether synchronous processing should be strictly used.
-
-
-
Method Detail
-
basic
default FileEndpointBuilderFactory.FileEndpointProducerBuilder basic()
-
allowNullBody
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder allowNullBody(boolean allowNullBody)
Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false, and attempting to send a null body to the file component, a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist option is set to 'Override', then the file will be truncated, and if set to append the file will remain unchanged. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
allowNullBody
- the value to set- Returns:
- the dsl builder
-
allowNullBody
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder allowNullBody(String allowNullBody)
Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false, and attempting to send a null body to the file component, a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist option is set to 'Override', then the file will be truncated, and if set to append the file will remain unchanged. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
allowNullBody
- the value to set- Returns:
- the dsl builder
-
chmod
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder chmod(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. The option is a: <code>java.lang.String</code> type. Group: producer (advanced)- Parameters:
chmod
- the value to set- Returns:
- the dsl builder
-
chmodDirectory
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder chmodDirectory(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. The option is a: <code>java.lang.String</code> type. Group: producer (advanced)- Parameters:
chmodDirectory
- the value to set- Returns:
- the dsl builder
-
eagerDeleteTargetFile
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder eagerDeleteTargetFile(boolean eagerDeleteTargetFile)
Whether or not to eagerly delete any existing target file. This option only applies when you use fileExists=Override and the tempFileName option as well. You can use this to disable (set it to false) deleting the target file before the temp file is written. For example you may write big files and want the target file to exists during the temp file is being written. This ensure the target file is only deleted until the very last moment, just before the temp file is being renamed to the target filename. This option is also used to control whether to delete any existing files when fileExist=Move is enabled, and an existing file exists. If this option copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if its true, then the existing file is deleted before the move operation. The option is a: <code>boolean</code> type. Default: true Group: producer (advanced)- Parameters:
eagerDeleteTargetFile
- the value to set- Returns:
- the dsl builder
-
eagerDeleteTargetFile
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder eagerDeleteTargetFile(String eagerDeleteTargetFile)
Whether or not to eagerly delete any existing target file. This option only applies when you use fileExists=Override and the tempFileName option as well. You can use this to disable (set it to false) deleting the target file before the temp file is written. For example you may write big files and want the target file to exists during the temp file is being written. This ensure the target file is only deleted until the very last moment, just before the temp file is being renamed to the target filename. This option is also used to control whether to delete any existing files when fileExist=Move is enabled, and an existing file exists. If this option copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if its true, then the existing file is deleted before the move operation. The option will be converted to a <code>boolean</code> type. Default: true Group: producer (advanced)- Parameters:
eagerDeleteTargetFile
- the value to set- Returns:
- the dsl builder
-
forceWrites
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder forceWrites(boolean forceWrites)
Whether to force syncing writes to the file system. You can turn this off if you do not want this level of guarantee, for example if writing to logs / audit logs etc; this would yield better performance. The option is a: <code>boolean</code> type. Default: true Group: producer (advanced)- Parameters:
forceWrites
- the value to set- Returns:
- the dsl builder
-
forceWrites
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder forceWrites(String forceWrites)
Whether to force syncing writes to the file system. You can turn this off if you do not want this level of guarantee, for example if writing to logs / audit logs etc; this would yield better performance. The option will be converted to a <code>boolean</code> type. Default: true Group: producer (advanced)- Parameters:
forceWrites
- the value to set- Returns:
- the dsl builder
-
keepLastModified
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder keepLastModified(boolean keepLastModified)
Will keep the last modified timestamp from the source file (if any). Will use the Exchange.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it will set this timestamp on the written file. Note: This option only applies to the file producer. You cannot use this option with any of the ftp producers. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
keepLastModified
- the value to set- Returns:
- the dsl builder
-
keepLastModified
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder keepLastModified(String keepLastModified)
Will keep the last modified timestamp from the source file (if any). Will use the Exchange.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it will set this timestamp on the written file. Note: This option only applies to the file producer. You cannot use this option with any of the ftp producers. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)- Parameters:
keepLastModified
- the value to set- Returns:
- the dsl builder
-
moveExistingFileStrategy
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder moveExistingFileStrategy(org.apache.camel.component.file.strategy.FileMoveExistingStrategy moveExistingFileStrategy)
Strategy (Custom Strategy) used to move file with special naming token to use when fileExist=Move is configured. By default, there is an implementation used if no custom strategy is provided. The option is a: <code>org.apache.camel.component.file.strategy.FileMoveExistingStrategy</code> type. Group: producer (advanced)- Parameters:
moveExistingFileStrategy
- the value to set- Returns:
- the dsl builder
-
moveExistingFileStrategy
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder moveExistingFileStrategy(String moveExistingFileStrategy)
Strategy (Custom Strategy) used to move file with special naming token to use when fileExist=Move is configured. By default, there is an implementation used if no custom strategy is provided. The option will be converted to a <code>org.apache.camel.component.file.strategy.FileMoveExistingStrategy</code> type. Group: producer (advanced)- Parameters:
moveExistingFileStrategy
- the value to set- Returns:
- the dsl builder
-
autoCreate
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder autoCreate(boolean autoCreate)
Automatically create missing directories in the file's pathname. For the file consumer, that means creating the starting directory. For the file producer, it means the directory the files should be written to. The option is a: <code>boolean</code> type. Default: true Group: advanced- Parameters:
autoCreate
- the value to set- Returns:
- the dsl builder
-
autoCreate
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder autoCreate(String autoCreate)
Automatically create missing directories in the file's pathname. For the file consumer, that means creating the starting directory. For the file producer, it means the directory the files should be written to. The option will be converted to a <code>boolean</code> type. Default: true Group: advanced- Parameters:
autoCreate
- the value to set- Returns:
- the dsl builder
-
bufferSize
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder bufferSize(int bufferSize)
Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading files). The option is a: <code>int</code> type. Default: 131072 Group: advanced- Parameters:
bufferSize
- the value to set- Returns:
- the dsl builder
-
bufferSize
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder bufferSize(String bufferSize)
Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading files). The option will be converted to a <code>int</code> type. Default: 131072 Group: advanced- Parameters:
bufferSize
- the value to set- Returns:
- the dsl builder
-
copyAndDeleteOnRenameFail
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder copyAndDeleteOnRenameFail(boolean copyAndDeleteOnRenameFail)
Whether to fallback and do a copy and delete file, in case the file could not be renamed directly. This option is not available for the FTP component. The option is a: <code>boolean</code> type. Default: true Group: advanced- Parameters:
copyAndDeleteOnRenameFail
- the value to set- Returns:
- the dsl builder
-
copyAndDeleteOnRenameFail
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder copyAndDeleteOnRenameFail(String copyAndDeleteOnRenameFail)
Whether to fallback and do a copy and delete file, in case the file could not be renamed directly. This option is not available for the FTP component. The option will be converted to a <code>boolean</code> type. Default: true Group: advanced- Parameters:
copyAndDeleteOnRenameFail
- the value to set- Returns:
- the dsl builder
-
renameUsingCopy
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder renameUsingCopy(boolean renameUsingCopy)
Perform rename operations using a copy and delete strategy. This is primarily used in environments where the regular rename operation is unreliable (e.g. across different file systems or networks). This option takes precedence over the copyAndDeleteOnRenameFail parameter that will automatically fall back to the copy and delete strategy, but only after additional delays. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
renameUsingCopy
- the value to set- Returns:
- the dsl builder
-
renameUsingCopy
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder renameUsingCopy(String renameUsingCopy)
Perform rename operations using a copy and delete strategy. This is primarily used in environments where the regular rename operation is unreliable (e.g. across different file systems or networks). This option takes precedence over the copyAndDeleteOnRenameFail parameter that will automatically fall back to the copy and delete strategy, but only after additional delays. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced- Parameters:
renameUsingCopy
- the value to set- Returns:
- the dsl builder
-
synchronous
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder synchronous(boolean synchronous)
Sets whether synchronous processing should be strictly used. The option is a: <code>boolean</code> type. Default: false Group: advanced- Parameters:
synchronous
- the value to set- Returns:
- the dsl builder
-
synchronous
default FileEndpointBuilderFactory.AdvancedFileEndpointProducerBuilder synchronous(String synchronous)
Sets whether synchronous processing should be strictly used. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced- Parameters:
synchronous
- the value to set- Returns:
- the dsl builder
-
-