Interface MailEndpointBuilderFactory.MailEndpointConsumerBuilder

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

    public static interface MailEndpointBuilderFactory.MailEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Builder for endpoint consumers for the IMAP component.
    • Method Detail

      • bridgeErrorHandler

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder bridgeErrorHandler​(boolean bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: boolean type. Default: false Group: consumer
      • bridgeErrorHandler

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder bridgeErrorHandler​(String bridgeErrorHandler)
        Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a boolean type. Default: false Group: consumer
      • closeFolder

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder closeFolder​(boolean closeFolder)
        Whether the consumer should close the folder after polling. Setting this option to false and having disconnect=false as well, then the consumer keep the folder open between polls. The option is a: boolean type. Default: true Group: consumer
      • closeFolder

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder closeFolder​(String closeFolder)
        Whether the consumer should close the folder after polling. Setting this option to false and having disconnect=false as well, then the consumer keep the folder open between polls. The option will be converted to a boolean type. Default: true Group: consumer
      • copyTo

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder copyTo​(String copyTo)
        After processing a mail message, it can be copied to a mail folder with the given name. You can override this configuration value, with a header with the key copyTo, allowing you to copy messages to folder names configured at runtime. The option is a: java.lang.String type. Group: consumer
      • delete

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder delete​(boolean delete)
        Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not. The option is a: boolean type. Default: false Group: consumer
      • delete

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder delete​(String delete)
        Deletes the messages after they have been processed. This is done by setting the DELETED flag on the mail message. If false, the SEEN flag is set instead. As of Camel 2.10 you can override this configuration option by setting a header with the key delete to determine if the mail should be deleted or not. The option will be converted to a boolean type. Default: false Group: consumer
      • disconnect

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder disconnect​(boolean disconnect)
        Whether the consumer should disconnect after polling. If enabled this forces Camel to connect on each poll. The option is a: boolean type. Default: false Group: consumer
      • handleFailedMessage

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder handleFailedMessage​(boolean handleFailedMessage)
        If the mail consumer cannot retrieve a given mail message, then this option allows to handle the caused exception by the consumer's error handler. By enable the bridge error handler on the consumer, then the Camel routing error handler can handle the exception instead. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. The option is a: boolean type. Default: false Group: consumer
      • handleFailedMessage

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder handleFailedMessage​(String handleFailedMessage)
        If the mail consumer cannot retrieve a given mail message, then this option allows to handle the caused exception by the consumer's error handler. By enable the bridge error handler on the consumer, then the Camel routing error handler can handle the exception instead. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. The option will be converted to a boolean type. Default: false Group: consumer
      • maxMessagesPerPoll

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder maxMessagesPerPoll​(int maxMessagesPerPoll)
        Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts up. Set a value of 0 or negative to disable this option. The option is a: int type. Group: consumer
      • maxMessagesPerPoll

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder maxMessagesPerPoll​(String maxMessagesPerPoll)
        Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts up. Set a value of 0 or negative to disable this option. The option will be converted to a int type. Group: consumer
      • mimeDecodeHeaders

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder mimeDecodeHeaders​(boolean mimeDecodeHeaders)
        This option enables transparent MIME decoding and unfolding for mail headers. The option is a: boolean type. Default: false Group: consumer
      • moveTo

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder moveTo​(String moveTo)
        After processing a mail message, it can be moved to a mail folder with the given name. You can override this configuration value, with a header with the key moveTo, allowing you to move messages to folder names configured at runtime. The option is a: java.lang.String type. Group: consumer
      • peek

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder peek​(boolean peek)
        Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. The option is a: boolean type. Default: true Group: consumer
      • peek

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder peek​(String peek)
        Will mark the javax.mail.Message as peeked before processing the mail message. This applies to IMAPMessage messages types only. By using peek the mail will not be eager marked as SEEN on the mail server, which allows us to rollback the mail message if there is an error processing in Camel. The option will be converted to a boolean type. Default: true Group: consumer
      • sendEmptyMessageWhenIdle

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder sendEmptyMessageWhenIdle​(boolean sendEmptyMessageWhenIdle)
        If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. The option is a: boolean type. Default: false Group: consumer
      • sendEmptyMessageWhenIdle

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder sendEmptyMessageWhenIdle​(String sendEmptyMessageWhenIdle)
        If the polling consumer did not poll any files, you can enable this option to send an empty message (no body) instead. The option will be converted to a boolean type. Default: false Group: consumer
      • skipFailedMessage

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder skipFailedMessage​(boolean skipFailedMessage)
        If the mail consumer cannot retrieve a given mail message, then this option allows to skip the message and move on to retrieve the next mail message. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. The option is a: boolean type. Default: false Group: consumer
      • skipFailedMessage

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder skipFailedMessage​(String skipFailedMessage)
        If the mail consumer cannot retrieve a given mail message, then this option allows to skip the message and move on to retrieve the next mail message. The default behavior would be the consumer throws an exception and no mails from the batch would be able to be routed by Camel. The option will be converted to a boolean type. Default: false Group: consumer
      • idempotentRepository

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder idempotentRepository​(org.apache.camel.spi.IdempotentRepository idempotentRepository)
        A pluggable repository org.apache.camel.spi.IdempotentRepository which allows to cluster consuming from the same mailbox, and let the repository coordinate whether a mail message is valid for the consumer to process. By default no repository is in use. The option is a: org.apache.camel.spi.IdempotentRepository type. Group: filter
      • idempotentRepository

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder idempotentRepository​(String idempotentRepository)
        A pluggable repository org.apache.camel.spi.IdempotentRepository which allows to cluster consuming from the same mailbox, and let the repository coordinate whether a mail message is valid for the consumer to process. By default no repository is in use. The option will be converted to a org.apache.camel.spi.IdempotentRepository type. Group: filter
      • idempotentRepositoryRemoveOnCommit

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder idempotentRepositoryRemoveOnCommit​(boolean idempotentRepositoryRemoveOnCommit)
        When using idempotent repository, then when the mail message has been successfully processed and is committed, should the message id be removed from the idempotent repository (default) or be kept in the repository. By default its assumed the message id is unique and has no value to be kept in the repository, because the mail message will be marked as seen/moved or deleted to prevent it from being consumed again. And therefore having the message id stored in the idempotent repository has little value. However this option allows to store the message id, for whatever reason you may have. The option is a: boolean type. Default: true Group: filter
      • idempotentRepositoryRemoveOnCommit

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder idempotentRepositoryRemoveOnCommit​(String idempotentRepositoryRemoveOnCommit)
        When using idempotent repository, then when the mail message has been successfully processed and is committed, should the message id be removed from the idempotent repository (default) or be kept in the repository. By default its assumed the message id is unique and has no value to be kept in the repository, because the mail message will be marked as seen/moved or deleted to prevent it from being consumed again. And therefore having the message id stored in the idempotent repository has little value. However this option allows to store the message id, for whatever reason you may have. The option will be converted to a boolean type. Default: true Group: filter
      • searchTerm

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder searchTerm​(String key,
                                                                                  Object value)
        Refers to a javax.mail.search.SearchTerm which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. The option is a: javax.mail.search.SearchTerm type. The option is multivalued, and you can use the searchTerm(String, Object) method to add a value (call the method multiple times to set more values). Group: filter
      • searchTerm

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder searchTerm​(Map values)
        Refers to a javax.mail.search.SearchTerm which allows to filter mails based on search criteria such as subject, body, from, sent after a certain date etc. The option is a: javax.mail.search.SearchTerm type. The option is multivalued, and you can use the searchTerm(String, Object) method to add a value (call the method multiple times to set more values). Group: filter
      • backoffErrorThreshold

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffErrorThreshold​(int backoffErrorThreshold)
        The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. The option is a: int type. Group: scheduler
      • backoffErrorThreshold

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffErrorThreshold​(String backoffErrorThreshold)
        The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. The option will be converted to a int type. Group: scheduler
      • backoffIdleThreshold

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffIdleThreshold​(int backoffIdleThreshold)
        The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. The option is a: int type. Group: scheduler
      • backoffIdleThreshold

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffIdleThreshold​(String backoffIdleThreshold)
        The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. The option will be converted to a int type. Group: scheduler
      • backoffMultiplier

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffMultiplier​(int backoffMultiplier)
        To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. The option is a: int type. Group: scheduler
      • backoffMultiplier

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder backoffMultiplier​(String backoffMultiplier)
        To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. The option will be converted to a int type. Group: scheduler
      • greedy

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder greedy​(boolean greedy)
        If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. The option is a: boolean type. Default: false Group: scheduler
      • greedy

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder greedy​(String greedy)
        If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the previous run polled 1 or more messages. The option will be converted to a boolean type. Default: false Group: scheduler
      • repeatCount

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder repeatCount​(long repeatCount)
        Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. The option is a: long type. Default: 0 Group: scheduler
      • repeatCount

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder repeatCount​(String repeatCount)
        Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever. The option will be converted to a long type. Default: 0 Group: scheduler
      • runLoggingLevel

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder runLoggingLevel​(org.apache.camel.LoggingLevel runLoggingLevel)
        The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option is a: org.apache.camel.LoggingLevel type. Default: TRACE Group: scheduler
      • runLoggingLevel

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder runLoggingLevel​(String runLoggingLevel)
        The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option will be converted to a org.apache.camel.LoggingLevel type. Default: TRACE Group: scheduler
      • scheduledExecutorService

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder scheduledExecutorService​(ScheduledExecutorService scheduledExecutorService)
        Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option is a: java.util.concurrent.ScheduledExecutorService type. Group: scheduler
      • scheduledExecutorService

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder scheduledExecutorService​(String scheduledExecutorService)
        Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option will be converted to a java.util.concurrent.ScheduledExecutorService type. Group: scheduler
      • schedulerProperties

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder schedulerProperties​(String key,
                                                                                           Object value)
        To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the schedulerProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: scheduler
      • schedulerProperties

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder schedulerProperties​(Map values)
        To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the schedulerProperties(String, Object) method to add a value (call the method multiple times to set more values). Group: scheduler
      • useFixedDelay

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder useFixedDelay​(boolean useFixedDelay)
        Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. The option is a: boolean type. Default: true Group: scheduler
      • sortTerm

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder sortTerm​(Object[] sortTerm)
        Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3 or when IMAP server does not have the SORT capability. The option is a: com.sun.mail.imap.SortTerm[] type. Group: sort
      • sortTerm

        default MailEndpointBuilderFactory.MailEndpointConsumerBuilder sortTerm​(String sortTerm)
        Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when using POP3 or when IMAP server does not have the SORT capability. The option will be converted to a com.sun.mail.imap.SortTerm[] type. Group: sort