Interface FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    FileEndpointBuilderFactory.AdvancedFileEndpointBuilder
    Enclosing interface:
    FileEndpointBuilderFactory

    public static interface FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Advanced builder for endpoint consumers for the File component.
    • Method Detail

      • directoryMustExist

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder directoryMustExist​(boolean directoryMustExist)
        Similar to the startingDirectoryMustExist option but this applies during polling (after starting the consumer). The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        directoryMustExist - the value to set
        Returns:
        the dsl builder
      • directoryMustExist

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder directoryMustExist​(String directoryMustExist)
        Similar to the startingDirectoryMustExist option but this applies during polling (after starting the consumer). The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        directoryMustExist - the value to set
        Returns:
        the dsl builder
      • exceptionHandler

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder exceptionHandler​(org.apache.camel.spi.ExceptionHandler exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exceptionHandler

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder exceptionHandler​(String exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        exceptionHandler - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder exchangePattern​(org.apache.camel.ExchangePattern exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • exchangePattern

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder exchangePattern​(String exchangePattern)
        Sets the exchange pattern when the consumer creates an exchange. The option will be converted to a <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced)
        Parameters:
        exchangePattern - the value to set
        Returns:
        the dsl builder
      • extendedAttributes

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder extendedAttributes​(String extendedAttributes)
        To define which file attributes of interest. Like posix:permissions,posix:owner,basic:lastAccessTime, it supports basic wildcard like posix:, basic:lastAccessTime. The option is a: <code>java.lang.String</code> type. Group: consumer (advanced)
        Parameters:
        extendedAttributes - the value to set
        Returns:
        the dsl builder
      • inProgressRepository

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder inProgressRepository​(org.apache.camel.spi.IdempotentRepository inProgressRepository)
        A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress repository is used to account the current in progress files being consumed. By default a memory based repository is used. The option is a: <code>org.apache.camel.spi.IdempotentRepository</code> type. Group: consumer (advanced)
        Parameters:
        inProgressRepository - the value to set
        Returns:
        the dsl builder
      • inProgressRepository

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder inProgressRepository​(String inProgressRepository)
        A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress repository is used to account the current in progress files being consumed. By default a memory based repository is used. The option will be converted to a <code>org.apache.camel.spi.IdempotentRepository</code> type. Group: consumer (advanced)
        Parameters:
        inProgressRepository - the value to set
        Returns:
        the dsl builder
      • localWorkDirectory

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder localWorkDirectory​(String localWorkDirectory)
        When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file and thus can conserve memory. The option is a: <code>java.lang.String</code> type. Group: consumer (advanced)
        Parameters:
        localWorkDirectory - the value to set
        Returns:
        the dsl builder
      • onCompletionExceptionHandler

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder onCompletionExceptionHandler​(org.apache.camel.spi.ExceptionHandler onCompletionExceptionHandler)
        To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that happens during the file on completion process where the consumer does either a commit or rollback. The default implementation will log any exception at WARN level and ignore. The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        onCompletionExceptionHandler - the value to set
        Returns:
        the dsl builder
      • onCompletionExceptionHandler

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder onCompletionExceptionHandler​(String onCompletionExceptionHandler)
        To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that happens during the file on completion process where the consumer does either a commit or rollback. The default implementation will log any exception at WARN level and ignore. The option will be converted to a <code>org.apache.camel.spi.ExceptionHandler</code> type. Group: consumer (advanced)
        Parameters:
        onCompletionExceptionHandler - the value to set
        Returns:
        the dsl builder
      • pollStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder pollStrategy​(org.apache.camel.spi.PollingConsumerPollStrategy pollStrategy)
        A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option is a: <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)
        Parameters:
        pollStrategy - the value to set
        Returns:
        the dsl builder
      • pollStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder pollStrategy​(String pollStrategy)
        A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. The option will be converted to a <code>org.apache.camel.spi.PollingConsumerPollStrategy</code> type. Group: consumer (advanced)
        Parameters:
        pollStrategy - the value to set
        Returns:
        the dsl builder
      • probeContentType

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder probeContentType​(boolean probeContentType)
        Whether to enable probing of the content type. If enable then the consumer uses 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. The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        probeContentType - the value to set
        Returns:
        the dsl builder
      • probeContentType

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder probeContentType​(String probeContentType)
        Whether to enable probing of the content type. If enable then the consumer uses 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. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        probeContentType - the value to set
        Returns:
        the dsl builder
      • processStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder processStrategy​(Object processStrategy)
        A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to implement your own readLock option or similar. Can also be used when special conditions must be met before a file can be consumed, such as a special ready file exists. If this option is set then the readLock option does not apply. The option is a: <code>org.apache.camel.component.file.GenericFileProcessStrategy&lt;java.io.File&gt;</code> type. Group: consumer (advanced)
        Parameters:
        processStrategy - the value to set
        Returns:
        the dsl builder
      • processStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder processStrategy​(String processStrategy)
        A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to implement your own readLock option or similar. Can also be used when special conditions must be met before a file can be consumed, such as a special ready file exists. If this option is set then the readLock option does not apply. The option will be converted to a <code>org.apache.camel.component.file.GenericFileProcessStrategy&lt;java.io.File&gt;</code> type. Group: consumer (advanced)
        Parameters:
        processStrategy - the value to set
        Returns:
        the dsl builder
      • resumeStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder resumeStrategy​(Object resumeStrategy)
        Set a resume strategy for files. This makes it possible to define a strategy for resuming reading files after the last point before stopping the application. See the FileConsumerResumeStrategy for implementation details. The option is a: <code>org.apache.camel.component.file.consumer.FileConsumerResumeStrategy</code> type. Group: consumer (advanced)
        Parameters:
        resumeStrategy - the value to set
        Returns:
        the dsl builder
      • resumeStrategy

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder resumeStrategy​(String resumeStrategy)
        Set a resume strategy for files. This makes it possible to define a strategy for resuming reading files after the last point before stopping the application. See the FileConsumerResumeStrategy for implementation details. The option will be converted to a <code>org.apache.camel.component.file.consumer.FileConsumerResumeStrategy</code> type. Group: consumer (advanced)
        Parameters:
        resumeStrategy - the value to set
        Returns:
        the dsl builder
      • startingDirectoryMustExist

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder startingDirectoryMustExist​(boolean startingDirectoryMustExist)
        Whether the starting directory must exist. Mind that the autoCreate option is default enabled, which means the starting directory is normally auto created if it doesn't exist. You can disable autoCreate and enable this to ensure the starting directory must exist. Will thrown an exception if the directory doesn't exist. The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        startingDirectoryMustExist - the value to set
        Returns:
        the dsl builder
      • startingDirectoryMustExist

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder startingDirectoryMustExist​(String startingDirectoryMustExist)
        Whether the starting directory must exist. Mind that the autoCreate option is default enabled, which means the starting directory is normally auto created if it doesn't exist. You can disable autoCreate and enable this to ensure the starting directory must exist. Will thrown an exception if the directory doesn't exist. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        startingDirectoryMustExist - the value to set
        Returns:
        the dsl builder
      • startingDirectoryMustHaveAccess

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder startingDirectoryMustHaveAccess​(boolean startingDirectoryMustHaveAccess)
        Whether the starting directory has access permissions. Mind that the startingDirectoryMustExist parameter must be set to true in order to verify that the directory exists. Will thrown an exception if the directory doesn't have read and write permissions. The option is a: <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        startingDirectoryMustHaveAccess - the value to set
        Returns:
        the dsl builder
      • startingDirectoryMustHaveAccess

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder startingDirectoryMustHaveAccess​(String startingDirectoryMustHaveAccess)
        Whether the starting directory has access permissions. Mind that the startingDirectoryMustExist parameter must be set to true in order to verify that the directory exists. Will thrown an exception if the directory doesn't have read and write permissions. The option will be converted to a <code>boolean</code> type. Default: false Group: consumer (advanced)
        Parameters:
        startingDirectoryMustHaveAccess - the value to set
        Returns:
        the dsl builder
      • autoCreate

        default FileEndpointBuilderFactory.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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.AdvancedFileEndpointConsumerBuilder 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